This commit is contained in:
2023-03-20 16:20:33 +00:00
parent 514c3ac3f6
commit 8c7d6421f5
2288 changed files with 712 additions and 73769 deletions
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
var _unibase_dateFormat="dd/MM/yyyy",Unibase;(function(n){let t;(function(n){let t;(function(n){class t{formatPeriod(n){return moment(n).fromNow()}formatLocal(n){var t=moment.utc(n).local(),i=moment().diff(t,"months");return i==0?this.formatPeriod(t):t.format("DD MMM, YYYY HH:mm")}formatLocalWithOutTime(n){var t=moment.utc(n).local(),i=moment().diff(t,"months");return i==0?this.formatPeriod(t):t.format("DD MMM, YYYY")}formatLocalDate(n){var t=moment.utc(n).local();return t.format("MMM DD, YYYY")}formatLocalDateFirst(n){var t=moment.utc(n).local();return t.format("DD MMM YYYY")}formatLocalDateFormatMonth(n){var t=moment.utc(n).local();return t.format("MM/DD/YYYY")}formatLocalDateTimeWithT(n){var t=moment.utc(n).local();return t.format("MMM DD, YYYY hh:mm a")}formatLocalDateformat(n,t){var i=moment.utc(n).local();return(t==null||t=="")&&(t=_unibase_dateFormat.toUpperCase()),t==""&&(t="DD/MM/YYYY"),i.format(t)}formatDateSeconds(n){var t,i;return n!="null"?n.includes("/")?(t=n.split("/"),i=t[0]+"/"+t[1]+"/"+t[2],i):(t=n.split("-"),i=t[0]+"/"+t[1]+"/"+t[2],i):null}formatLocalDate1(n,t){var i=moment.utc(n).local();return(t==null||t=="")&&(t=_unibase_dateFormat.toUpperCase()),t==""&&(t="DD/MM/YYYY"),i.format(t)}formatLocalTime(n,t){var i=moment.utc(n).local();return(t==null||t=="")&&(t=_unibase_dateFormat.toUpperCase()),t==""&&(t="DD/MM/YYYY HH:mm:ss"),i.format(t)}formatServerLocalDate(n,t){var i=moment.utc(n).local();return(t==null||t=="")&&(t=_unibase_dateFormat.toUpperCase()),t==""&&(t="YYYY/MM/DD"),i.format(t)}formatServerLocalDateTime(n,t){var i=moment.utc(n).local();return(t==null||t=="")&&(t=_unibase_dateFormat.toUpperCase()),t==""&&(t="YYYY/MM/DD HH:mm:ss"),i.format(t)}formatServerDate(n){var t=_unibase_dateFormat.toUpperCase(),i;return t==""&&(t="DD/MM/YYYY"),i=moment.utc(n,t),i.format("YYYY/MM/DD")}serverDateformat(n){var t=_unibase_dateFormat.toUpperCase();return t==""&&(t="DD/MM/YYYY"),moment.utc(n).format(t)}FormatDateTime(n){return n=="1900-01-01T00:00:00"||n=="NA"?"NA":n.toString().indexOf("T")>-1?(n=n.toString().replace("T"," "),moment(n).format("DD/MM/YYYY HH:mm:ss")):void 0}FormatDateTimeWithoutSeconds(n){return n=="1900-01-01T00:00:00"||n=="NA"?"NA":n.toString().indexOf("T")>-1?(n=n.toString().replace("T"," "),moment(n).format("DD/MM/YYYY HH:mm")):void 0}formatServerDateTime(n){var t=_unibase_dateFormat.toUpperCase(),i;return t==""&&(t="DD/MM/YYYY"),t=t+" HH:mm:ss",i=moment.utc(n,t),i.format("YYYY/MM/DD HH:mm:ss")}formatLocalDateTime(n){n.toString().indexOf("T")>-1&&(n=n.toString().replace("T"," "),n=moment(n).format("MM/DD/YYYY HH:mm:ss"));n=n+" +00:00";var t=moment.utc(n).local();return t.format("DD/MM/YYYY HH:mm:ss")}formatLocalDateTimeWithoutSeconds(n){n.toString().indexOf("T")>-1&&(n=n.toString().replace("T"," "),n=moment(n).format("MM/DD/YYYY HH:mm:ss"));n=n+" +00:00";var t=moment.utc(n).local();return t.format("DD/MM/YYYY HH:mm")}currentDate(){var n=new Date;return this.formatLocalDate(n)}daysFromNow(n){var t=new Date,i=new Date(n);return Math.round(Math.abs((t.getTime()-i.getTime())/864e5))}getFromDate(){return $("#hfBizgaze_FromDate").val()}getToDate(){return $("#hfBizgaze_ToDate").val()}dateRangePicker(n,t){var i=_unibase_dateFormat.toUpperCase();$(n).attr("placeholder",i);$(n).data("date-format",i);$(n).daterangepicker({startDate:moment().startOf("year"),endDate:moment().endOf("year"),locale:{format:i},ranges:{Today:[moment(),moment()],Yesterday:[moment().subtract(1,"days"),moment().subtract(1,"days")],"Last 7 Days":[moment().subtract(6,"days"),moment()],"Last 30 Days":[moment().subtract(29,"days"),moment()],"This Month":[moment().startOf("month"),moment().endOf("month")],"Last Month":[moment().subtract(1,"month").startOf("month"),moment().subtract(1,"month").endOf("month")]}},function(n,i){t!=null&&t(n,i)})}cb(n,t,i){$(n).val(t.format("MMMM D, YYYY")+" - "+i.format("MMMM D, YYYY"))}localTimeFormat(n){var r=n.split(":"),t,u,i;return t=r[0],u=r[1],t>12?(i="PM",t-=12):t<12?(i="AM",t==0&&(t=12)):i="PM",t+":"+u+" "+i}commentsdateformat(n){moment.relativeTimeThreshold("d",365);moment.updateLocale("en",{relativeTime:{future:"in %s",past:"%s ago",s:"%ds",ss:"%ds",m:"%dm",mm:"%dm",h:"%dh",hh:"%dh",d:"%dd",dd:"%dd",M:"%dmo",MM:"%dmo",y:"%dy",yy:"%dy"}});let t=moment.utc(n).local();return moment(t).fromNow(!0)}static Instance(){return(this.instance===null||this.instance===undefined)&&(this.instance=new t),this.instance}}n.DateTimeHelper=t})(t=n.Helpers||(n.Helpers={}))})(t=n.Platform||(n.Platform={}))})(Unibase||(Unibase={}));