marketplacepos 5.43.13 → 5.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Marketplace/3rdpartylicenses.txt +41 -41
- package/Marketplace/{chunk-IVHM5DMM.js → chunk-22AHRDNQ.js} +1 -1
- package/Marketplace/{chunk-YSJSAVBS.js → chunk-2ODVHD2K.js} +1 -1
- package/Marketplace/{chunk-DRHWRRQV.js → chunk-35XX6SQT.js} +1 -1
- package/Marketplace/{chunk-5BSS4CVK.js → chunk-3OIE7ARG.js} +1 -1
- package/Marketplace/chunk-3VUDKIND.js +1 -0
- package/Marketplace/{chunk-QQXVBN22.js → chunk-4PDRBB73.js} +1 -1
- package/Marketplace/chunk-4YWSKMFD.js +1 -0
- package/Marketplace/{chunk-AJJSLBE3.js → chunk-55BJO7BI.js} +2 -2
- package/Marketplace/{chunk-WS4A4RPE.js → chunk-5GLSI4QU.js} +1 -1
- package/Marketplace/{chunk-G2YN5S5X.js → chunk-5JQJRPL3.js} +1 -1
- package/Marketplace/{chunk-CUEO37N7.js → chunk-5W7TCSDK.js} +1 -1
- package/Marketplace/{chunk-2GSWEJRP.js → chunk-64JGYG54.js} +1 -1
- package/Marketplace/{chunk-2IDDYNBR.js → chunk-6BIM4KEI.js} +1 -1
- package/Marketplace/{chunk-722SRHLY.js → chunk-6RKA4STM.js} +1 -1
- package/Marketplace/{chunk-QWHPQWPM.js → chunk-77JJJNRM.js} +1 -1
- package/Marketplace/{chunk-SRVGUGY2.js → chunk-AO46RPZ4.js} +1 -1
- package/Marketplace/{chunk-6FY74YFQ.js → chunk-B5V5KFQU.js} +1 -1
- package/Marketplace/{chunk-PXYBLGMN.js → chunk-BO7BG424.js} +1 -1
- package/Marketplace/{chunk-WIAQQWWF.js → chunk-BU5LUO3S.js} +1 -1
- package/Marketplace/chunk-C3VEI2IE.js +1 -0
- package/Marketplace/{chunk-3B2PNJWF.js → chunk-CCWNSX4Y.js} +1 -1
- package/Marketplace/{chunk-6W6DKFRE.js → chunk-CIAZIJGR.js} +3 -3
- package/Marketplace/{chunk-J2KWRDVH.js → chunk-CUB2QFUO.js} +1 -1
- package/Marketplace/{chunk-WPW3D4MQ.js → chunk-D6URDVES.js} +1 -1
- package/Marketplace/{chunk-POR3OF22.js → chunk-DHIDUIOD.js} +1 -1
- package/Marketplace/{chunk-O5LFGGB2.js → chunk-DL66NZ2A.js} +1 -1
- package/Marketplace/chunk-E2SXYIML.js +2 -0
- package/Marketplace/{chunk-L7K5HOBY.js → chunk-E4KNET2R.js} +1 -1
- package/Marketplace/{chunk-7ZXNQAAU.js → chunk-E4Z7OR75.js} +2 -2
- package/Marketplace/{chunk-GH57P6KF.js → chunk-EJWZFRMT.js} +1 -1
- package/Marketplace/{chunk-NEYMDA6P.js → chunk-ELE7BOLL.js} +1 -1
- package/Marketplace/{chunk-AG2REZBE.js → chunk-ENLYKIFW.js} +8 -8
- package/Marketplace/{chunk-B73M3AMU.js → chunk-EQIFZBRG.js} +1 -1
- package/Marketplace/chunk-EVXMYPWP.js +1 -0
- package/Marketplace/{chunk-E6U3KRK7.js → chunk-G3O7MWIB.js} +1 -1
- package/Marketplace/{chunk-624I4PEE.js → chunk-G5DA2OSB.js} +1 -1
- package/Marketplace/{chunk-7UHCDGAA.js → chunk-G7R7LUW4.js} +1 -1
- package/Marketplace/{chunk-2EOAYJGX.js → chunk-GCDQNJQN.js} +1 -1
- package/Marketplace/{chunk-G47XGOST.js → chunk-GIRXMYNI.js} +1 -1
- package/Marketplace/{chunk-5HO2IJ47.js → chunk-GRIUDEPO.js} +1 -1
- package/Marketplace/chunk-H3DIKLA5.js +1 -0
- package/Marketplace/chunk-HWHDJDQN.js +1 -0
- package/Marketplace/chunk-HZHUTC6E.js +1 -0
- package/Marketplace/{chunk-YCH6HHU3.js → chunk-IHNN4Q2N.js} +3 -3
- package/Marketplace/{chunk-H3J5OAIG.js → chunk-IIZDEGGW.js} +2 -2
- package/Marketplace/{chunk-N3P55TG2.js → chunk-IMEGV3MV.js} +1 -1
- package/Marketplace/{chunk-7PN4XLNE.js → chunk-IMK2JGZA.js} +1 -1
- package/Marketplace/{chunk-WHG5PPSE.js → chunk-JF4QOCAZ.js} +1 -1
- package/Marketplace/{chunk-TCS2Y6CC.js → chunk-JHYTM6OD.js} +1 -1
- package/Marketplace/{chunk-ZUEJZI4O.js → chunk-JIOSKHGT.js} +1 -1
- package/Marketplace/{chunk-MHCAI6KP.js → chunk-K5GEJ2GZ.js} +1 -1
- package/Marketplace/{chunk-7SVF5UPT.js → chunk-KALG6D6L.js} +1 -1
- package/Marketplace/{chunk-Z7LBV3BO.js → chunk-KGMQTWMX.js} +1 -1
- package/Marketplace/{chunk-U7TVLBC5.js → chunk-KIPJJIYU.js} +1 -1
- package/Marketplace/{chunk-M5JQ7BGW.js → chunk-L3FX4O3H.js} +6 -6
- package/Marketplace/{chunk-CRUPQQ56.js → chunk-LC6TXSYB.js} +1 -1
- package/Marketplace/{chunk-CROPN4YC.js → chunk-LDHQNVI5.js} +1 -1
- package/Marketplace/chunk-LFAU6HXM.js +1 -0
- package/Marketplace/{chunk-6NHTTVBK.js → chunk-LRCKOJEI.js} +1 -1
- package/Marketplace/{chunk-6G5WVJGA.js → chunk-LYBSI3ZX.js} +1 -1
- package/Marketplace/{chunk-LROLRGKE.js → chunk-LYZVX4EZ.js} +1 -1
- package/Marketplace/{chunk-YD5TUVFF.js → chunk-M6YFSBMG.js} +1 -1
- package/Marketplace/{chunk-6BAZYVHI.js → chunk-MDHPQWC7.js} +2 -2
- package/Marketplace/{chunk-3BT5DR3X.js → chunk-MH4SJTQX.js} +1 -1
- package/Marketplace/{chunk-2TRFYYCP.js → chunk-MKUH4R2N.js} +1 -1
- package/Marketplace/chunk-MRODDSR7.js +1 -0
- package/Marketplace/chunk-MS3ZBCON.js +157 -0
- package/Marketplace/{chunk-XBUZ27V4.js → chunk-NDSJ4AAU.js} +1 -1
- package/Marketplace/{chunk-GMVNN57A.js → chunk-NSS35UR3.js} +1 -1
- package/Marketplace/{chunk-OLCFJJOD.js → chunk-OFD3D5IO.js} +1 -1
- package/Marketplace/{chunk-3TDK2RMH.js → chunk-OFUTQWBX.js} +1 -1
- package/Marketplace/{chunk-RZU7PSKG.js → chunk-OPFENZ3W.js} +1 -1
- package/Marketplace/{chunk-3NMM37H7.js → chunk-P7NATRFC.js} +1 -1
- package/Marketplace/{chunk-IRLIWSK5.js → chunk-PANQ33RQ.js} +1 -1
- package/Marketplace/{chunk-JDIBETL5.js → chunk-PNITO7BE.js} +1 -1
- package/Marketplace/{chunk-EOZ2J2CF.js → chunk-PVPN53WE.js} +1 -1
- package/Marketplace/{chunk-PFB7XEYZ.js → chunk-QJJ2WFVX.js} +1 -1
- package/Marketplace/chunk-QYCOQS7D.js +2 -0
- package/Marketplace/{chunk-2YFZS6SG.js → chunk-RHCH74ZR.js} +1 -1
- package/Marketplace/chunk-RMAEWPJV.js +1 -0
- package/Marketplace/{chunk-VKMFDXJJ.js → chunk-SLI26GUH.js} +1 -1
- package/Marketplace/{chunk-C3HL4S2R.js → chunk-STPUGFHI.js} +1 -1
- package/Marketplace/{chunk-EZY2ATQQ.js → chunk-TPC5KHGH.js} +1 -1
- package/Marketplace/{chunk-LOBNKJGT.js → chunk-TPW56VWM.js} +1 -1
- package/Marketplace/chunk-TZQFN56G.js +1 -0
- package/Marketplace/{chunk-JILE74BG.js → chunk-UBXKO4QI.js} +1 -1
- package/Marketplace/{chunk-J7AN3ZQL.js → chunk-UCQKKX2L.js} +1 -1
- package/Marketplace/{chunk-CLER2MX6.js → chunk-UGVEAL7H.js} +3 -3
- package/Marketplace/{chunk-2OVYEC6Q.js → chunk-UUSBNUEH.js} +1 -1
- package/Marketplace/{chunk-ALSCWTAY.js → chunk-V4D6BB2N.js} +1 -1
- package/Marketplace/chunk-W3L5LPU5.js +1 -0
- package/Marketplace/{chunk-E6XWD6WX.js → chunk-W6FZQ6XT.js} +1 -1
- package/Marketplace/{chunk-OPXWL5G6.js → chunk-W7H6T326.js} +1 -1
- package/Marketplace/{chunk-MMVLDCF6.js → chunk-W7VYUPIP.js} +1 -1
- package/Marketplace/chunk-WKUTDZ7J.js +5 -0
- package/Marketplace/chunk-WY4BY2ID.js +3 -0
- package/Marketplace/chunk-X67M7TFE.js +1 -0
- package/Marketplace/{chunk-G2CMMGM2.js → chunk-X743YBE6.js} +1 -1
- package/Marketplace/chunk-XF4BVLTJ.js +1 -0
- package/Marketplace/chunk-XYEV5RMD.js +1 -0
- package/Marketplace/{chunk-BFU7VKO3.js → chunk-YM4TJJMM.js} +1 -1
- package/Marketplace/{chunk-CIIO2CJ6.js → chunk-YPWHTELF.js} +1 -1
- package/Marketplace/chunk-YRSF6N67.js +1 -0
- package/Marketplace/{chunk-DYWTLXMP.js → chunk-Z5GRNGHJ.js} +1 -1
- package/Marketplace/chunk-ZEYELO7U.js +1 -0
- package/Marketplace/chunk-ZMEMG7ZN.js +1 -0
- package/Marketplace/{chunk-L64EL5OU.js → chunk-ZQ5EGXEB.js} +2 -2
- package/Marketplace/{chunk-4JKDNUTX.js → chunk-ZXNM4AGN.js} +1 -1
- package/Marketplace/index.html +3 -3
- package/Marketplace/{main-2SUNMEPM.js → main-WUG4WUAT.js} +1 -1
- package/package.json +1 -1
- package/Marketplace/chunk-4B4NNOKK.js +0 -1
- package/Marketplace/chunk-56IX4GTG.js +0 -1
- package/Marketplace/chunk-67N4UGA5.js +0 -2
- package/Marketplace/chunk-7AQ244V7.js +0 -5
- package/Marketplace/chunk-DRMAONR7.js +0 -1
- package/Marketplace/chunk-GSZJGR7K.js +0 -2
- package/Marketplace/chunk-GVL2YXE5.js +0 -1
- package/Marketplace/chunk-HLOBDI4F.js +0 -2
- package/Marketplace/chunk-I7FTVK26.js +0 -1
- package/Marketplace/chunk-MY5ZX6JG.js +0 -1
- package/Marketplace/chunk-OOCYP2XG.js +0 -1
- package/Marketplace/chunk-Q3MVAL6O.js +0 -1
- package/Marketplace/chunk-QINGXOOA.js +0 -1
- package/Marketplace/chunk-SMUCMLEE.js +0 -1
- package/Marketplace/chunk-UG7VRDLB.js +0 -3
- package/Marketplace/chunk-V2RVHNCX.js +0 -1
- package/Marketplace/chunk-ZWBTWIGY.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as D}from"./chunk-
|
|
1
|
+
import{a as D}from"./chunk-ZXNM4AGN.js";import{a as fe}from"./chunk-NS46QSCM.js";import"./chunk-SM3P57SO.js";import{a as U}from"./chunk-UMP6ZMEJ.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as re}from"./chunk-Z3ITXK3D.js";import{a as pe}from"./chunk-ACIMXBIC.js";import"./chunk-GRIUDEPO.js";import{b as ae}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{c as oe}from"./chunk-PW42BQIY.js";import{m as me,n as ue}from"./chunk-UGVEAL7H.js";import{A as ie}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{b as le,c as se}from"./chunk-SWQXSJ7O.js";import{r as de,s as ce}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{E as Y,G as ee,H as te,J as ne,d as K,g as Q,j as W,m as X,n as P}from"./chunk-M2FCTYGU.js";import{$c as _,Gb as x,Gc as s,Hc as h,Ic as z,Jb as L,Mb as m,Nc as q,Oc as $,Pc as C,Qc as j,Sc as I,Tc as J,Yb as p,Z as V,aa as w,ac as S,ad as y,dc as T,ec as k,gc as A,hc as H,ic as a,jc as l,kc as u,lc as g,mc as v,ob as F,oc as B,pa as b,rb as r,rd as Z,tc as G,uc as c,v as M,ya as N,za as R}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as E,b as O}from"./chunk-66YHNWRR.js";var ge=(()=>{class t{transform(e){return typeof e=="number"&&(e=e.toString()),e!=null?e.replace(/\n/g,"<br />"):e}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275pipe=L({name:"newlines",type:t,pure:!0})}}return t})();var Ce=t=>({disabled:t}),_e=(t,d)=>({labelFilledInput:t,labelEmptyInput:d});function ye(t,d){if(t&1&&(a(0,"p"),s(1),_(2,"number"),l()),t&2){let e=c();r(),h(e.inputValueType()==="number"?y(2,1,e.inputValue):e.inputValue)}}function xe(t,d){if(t&1&&(u(0,"p",3),_(1,"newlines")),t&2){let e=c();p("innerHTML",y(1,1,e.inputValue),F)}}function Ie(t,d){if(t&1&&(g(0),s(1),v()),t&2){let e=c();r(),z(" ",e.labelValue," ")}}var ve=(()=>{class t{constructor(){this.inputValue="",this.labelValue="",this.inputType="input",this.labelVisible=!0,this.disabled=!1,this.class="mb-6",this.tooltip="",this.isInputFilled=!1,this.isNotEmpty=pe.IsNotEmpty}inputValueType(){return typeof this.inputValue}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["lib-info-page-input"]],inputs:{inputValue:"inputValue",labelValue:"labelValue",inputType:"inputType",labelVisible:"labelVisible",disabled:"disabled",class:"class",tooltip:"tooltip"},decls:5,vars:14,consts:[["matTooltipPosition","above",3,"ngClass","matTooltip"],[4,"ngIf"],[3,"innerHTML",4,"ngIf"],[3,"innerHTML"]],template:function(o,n){o&1&&(a(0,"div",0),m(1,ye,3,3,"p",1)(2,xe,2,3,"p",2),a(3,"label"),m(4,Ie,2,1,"ng-container",1),l()()),o&2&&(S(n.class),p("ngClass",I(9,Ce,n.disabled))("matTooltip",n.tooltip),r(),p("ngIf",n.isNotEmpty(n.inputValue)&&n.inputType=="input"),r(),p("ngIf",n.isNotEmpty(n.inputValue)&&n.inputType=="textarea"),r(),S(J(11,_e,n.isNotEmpty(n.inputValue),!n.isNotEmpty(n.inputValue))),r(),p("ngIf",n.labelVisible))},dependencies:[P,K,Q,X,ge,ce,de],styles:["div[_ngcontent-%COMP%]{border:1px solid #ced4da;position:relative;margin-bottom:1rem;border-radius:.25rem!important}p[_ngcontent-%COMP%]{margin-top:18px;margin-bottom:18px;padding-left:.75rem!important;font-size:.875rem}.labelFilledInput[_ngcontent-%COMP%]{position:absolute;top:-10px;left:10px;background:#fff;padding-left:4px;padding-right:4px;font-size:.75rem!important;color:#9da2a6}.labelEmptyInput[_ngcontent-%COMP%]{margin-top:18px;margin-bottom:18px;padding-left:.75rem!important;font-size:.875rem;color:#ccc}.disabled[_ngcontent-%COMP%]{background-color:#e9ecef;opacity:1}"]})}}return t})();var Pe=t=>({ID:t});function Me(t,d){if(t&1){let e=B();a(0,"button",24),G("click",function(){N(e);let n=c(2),i=C(0);return R(n.onDeleteUser(i==null||i.selectedUser==null?null:i.selectedUser.ID))}),u(1,"i",25),s(2," Delete "),l()}}function Se(t,d){if(t&1&&(g(0),m(1,Me,3,0,"button",23),v()),t&2){let e,o=c(),n=C(0);r(),T((n==null||n.selectedUser==null?null:n.selectedUser.Name)!==((e=o.currentLoginUser())==null?null:e.username)?1:-1)}}function Te(t,d){if(t&1&&(g(0),a(1,"a",26),u(2,"i",27),s(3," Edit "),l(),v()),t&2){c();let e=C(0);r(),p("queryParams",I(1,Pe,e==null||e.selectedUser==null?null:e.selectedUser.ID))}}function Ue(t,d){t&1&&(a(0,"div",20),s(1," All channels assigned to this user "),l())}function De(t,d){if(t&1&&u(0,"p-chip",28),t&2){let e=d.$implicit;p("label",e.Name)("image",e.logo)("alt",e.Name)}}function Ee(t,d){if(t&1&&A(0,De,1,3,"p-chip",28,k),t&2){c();let e=C(0);H(e==null?null:e.selectedChannels)}}var ot=(()=>{class t{constructor(){this.userService=b(D),this.activatedRoute=b(Y),this.toastService=b(ae),this.router=b(ee),this.userLoader$=this.activatedRoute.queryParams.pipe(w(e=>{let o=e.ID||null;return this.userService.getUserFormLoader(o).pipe(V(1),M(n=>(n.Options.Channels=oe.assignChannelLogo(n.Options.Channels),n)))}),M(e=>{let o=e.Options.Users.find(f=>f.ID===e.Form?.ID),n=e.Options.Groups.find(f=>f.ID===e.Form?.GroupID),i=e.Options.Channels.filter(f=>e.UserChannels?.includes(f.ID));return O(E({},e),{selectedUser:o||null,selectedGroup:n||null,selectedChannels:i||[],DownloadOrderDaysRange:e.Form?.DownloadOrderDaysRange||"0"})})),this.userEditRole=U.UserEdit,this.userDeleteRole=U.UserDelete,this.currentLoginUser=Z(()=>{let e=localStorage.getItem(re.AUTHORIZATION);return e?JSON.parse(e):null})}onDeleteUser(e){confirm("Are you sure you want to delete this user?")&&this.userService.deleteUsers([e]).subscribe({next:()=>{this.router.navigate(["/menu/users/users"]),this.toastService.success("User deleted successfully","Success")}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=x({type:t,selectors:[["app-user-info"]],features:[j([D])],decls:50,vars:12,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","group","aria-label","User Actions",1,"btn-group"],[4,"ngxPermissionsOnly"],[1,"container-fluid","py-5","bg-light-gray"],[1,"row","mt-8"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body","mt-8","pb-4"],[1,"row"],[1,"col-6"],[1,"info-label-group"],["id","myTab","role","tablist",1,"nav","nav-tabs"],["role","presentation",1,"nav-item"],["id","channel-tab","data-bs-toggle","tab","data-bs-target","#channel-tab-pane","type","button","role","tab","aria-controls","channel-tab-pane","aria-selected","true",1,"nav-link","active"],["id","restriction-tab","data-bs-toggle","tab","data-bs-target","#restriction-tab-pane","type","button","role","tab","aria-controls","restriction-tab-pane","aria-selected","false",1,"nav-link"],[1,"card","rounded-0","border-top-0"],[1,"card-body","pb-4"],["id","myTabContent",1,"tab-content"],["id","channel-tab-pane","role","tabpanel","aria-labelledby","channel-tab","tabindex","0",1,"tab-pane","fade","show","active"],[1,"text-center","fs-5","opacity-50"],["id","restriction-tab-pane","role","tabpanel","aria-labelledby","restriction-tab-pane","tabindex","1",1,"tab-pane","fade"],["tooltip","How many days of past orders this user can download.","labelValue","Download Order Days Range","inputType","input",3,"inputValue"],[1,"btn","btn-outline-secondary"],[1,"btn","btn-outline-secondary",3,"click"],[1,"fa","fa-trash","me-1"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-outline-secondary",3,"queryParams"],[1,"fa","fa-edit","me-1"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"]],template:function(o,n){if(o&1&&(q(0),_(1,"async"),a(2,"mainpanel",0)(3,"actions")(4,"div",1),m(5,Se,2,1,"ng-container",2)(6,Te,4,3,"ng-container",2),l()(),a(7,"content")(8,"div",3)(9,"div",4)(10,"div",5)(11,"div",6)(12,"div",7)(13,"h3"),s(14,"User Information"),l()(),a(15,"div",8)(16,"div",9)(17,"div",10)(18,"div",11)(19,"label"),s(20,"Selected User"),l(),a(21,"div")(22,"span"),s(23),l()()()(),a(24,"div",10)(25,"div",11)(26,"label"),s(27,"Selected Group"),l(),a(28,"div")(29,"span"),s(30),l()()()()()()()()(),a(31,"div",9)(32,"div",5)(33,"ul",12)(34,"li",13)(35,"button",14),s(36," Channels Filter "),l()(),a(37,"li",13)(38,"button",15),s(39," Restriction "),l()()(),a(40,"div",16)(41,"div",17)(42,"div",18)(43,"div",19),m(44,Ue,2,0,"div",20)(45,Ee,2,0),l(),a(46,"div",21)(47,"div",9)(48,"div",10),u(49,"lib-info-page-input",22),l()()()()()()()()()()()),o&2){let i=$(y(1,9,n.userLoader$));r(2),p("headerTitle",(i==null||i.selectedUser==null?null:i.selectedUser.Name)+" Info")("hideSearchBox",!0)("hideSearchDropdown",!0),r(3),p("ngxPermissionsOnly",n.userDeleteRole),r(),p("ngxPermissionsOnly",n.userEditRole),r(17),h(i==null||i.selectedUser==null?null:i.selectedUser.Name),r(7),h(i==null||i.selectedGroup==null?null:i.selectedGroup.Name),r(14),T((i==null||i.selectedChannels==null?null:i.selectedChannels.length)===0?44:45),r(5),p("inputValue",i==null?null:i.DownloadOrderDaysRange)}},dependencies:[P,W,ue,me,ie,ne,te,fe,se,le,ve],styles:[".nav-tabs[_ngcontent-%COMP%] .nav-link.active[_ngcontent-%COMP%]:hover, .nav-tabs[_ngcontent-%COMP%] .nav-link.active[_ngcontent-%COMP%]:focus, .nav-tabs[_ngcontent-%COMP%] .nav-item.show[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:hover, .nav-tabs[_ngcontent-%COMP%] .nav-item.show[_ngcontent-%COMP%] .nav-link[_ngcontent-%COMP%]:focus{background-color:#fff!important;border-color:#dee2e6 #dee2e6 #fff}"]})}}return t})();export{ot as UserInfoComponent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as pe}from"./chunk-UMP6ZMEJ.js";import{a as me,h as xe}from"./chunk-UG7VRDLB.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{e as _e}from"./chunk-5JVEEL2T.js";import{a as v,c as ge}from"./chunk-PW42BQIY.js";import{a as fe,c as he}from"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as ue,e as y}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{A as le,c as ee,h as te,i as ne,k as ie,m as oe,n as re,t as ae,u as se,v as de,w as ce}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{E as P,G as C,J as D,d as $,f as z,g as J,j as X,n as Z}from"./chunk-M2FCTYGU.js";import{$c as G,Ac as U,Bc as W,Cc as q,Fc as O,Gb as _,Gc as a,Hb as A,Hc as b,Ic as H,Jc as B,Kc as E,Lc as I,Mb as f,Mc as L,Tc as Y,Yb as p,Z as R,ac as F,ad as Q,cd as K,ic as n,ja as V,jc as r,ka as T,kc as c,lc as S,mc as k,oc as N,pb as w,rb as s,tc as u,uc as m,xb as l,ya as h,za as x}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var be=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=V({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Ie(t,g){if(t&1&&(n(0,"swiper-slide")(1,"div")(2,"a",2),c(3,"img",3),r()(),n(4,"a",4),a(5),r(),n(6,"p",5),a(7),r()()),t&2){let e=g.$implicit;s(2),p("href",e.href,w),s(),p("src",e.imgSrc,w),s(),p("href",e.href,w),s(),b(e.title),s(2),b(e.description)}}var Ce=(()=>{class t{constructor(){this.newsList=[]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},standalone:!1,decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(i,o){i&1&&(n(0,"swiper-container",0),f(1,Ie,8,5,"swiper-slide",1),r()),i&2&&(s(),p("ngForOf",o.newsList))},dependencies:[z],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]})}}return t})();var Te=["subdomainEl"],Ae=(t,g)=>({"rounded-end":t,"border-end-0":g});function Ne(t,g){if(t&1&&(S(0),n(1,"div",36),c(2,"img",37),r(),k()),t&2){let e=g.$implicit;s(2),p("src",e.img,w)("title",e.title)("alt",e.title)}}function ze(t,g){if(t&1){let e=N();S(0),n(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),n(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),n(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),c(11,"i",24),r()(),n(12,"input",25,1),L("ngModelChange",function(o){h(e);let d=m();return I(d.subdomain,o)||(d.subdomain=o),x(o)}),r(),n(14,"div")(15,"select",26),L("ngModelChange",function(o){h(e);let d=m();return I(d.domain,o)||(d.domain=o),x(o)}),n(16,"option",27),a(17,".dealpos.co.id"),r(),n(18,"option",28),a(19,".dealpos.net"),r(),n(20,"option",29),a(21,".dealpos.com"),r(),n(22,"option",30),a(23,".dealpos.app"),r()()()(),n(24,"div",31)(25,"button",32),u("click",function(){h(e);let o=m();return x(o.onNextState())}),a(26," Next "),r()(),n(27,"div",33)(28,"div",34),f(29,Ne,3,3,"ng-container",35),r()()()(),k()}if(t&2){let e=m();s(12),E("ngModel",e.subdomain),s(3),E("ngModel",e.domain),s(14),p("ngForOf",e.channels)}}function De(t,g){t&1&&(n(0,"p"),a(1," Username is required "),r())}function je(t,g){if(t&1&&(S(0),n(1,"div",57),c(2,"div",58),n(3,"div",59),f(4,De,2,0,"p",47),r()(),k()),t&2){m();let e=O(14);s(4),p("ngIf",e.errors.required)}}function Re(t,g){if(t&1){let e=N();n(0,"i",62),u("click",function(){h(e);let o=m(3);return x(o.hideShowPassword())}),r()}if(t&2){let e=m(3);F("fa "+e.passwordIcon)}}function Ve(t,g){if(t&1&&(n(0,"span",60),f(1,Re,1,2,"i",61),r()),t&2){let e=m(2);s(),p("ngIf",e.password)}}function Fe(t,g){t&1&&(n(0,"p"),a(1," Password is required "),r())}function Ue(t,g){if(t&1&&(S(0),n(1,"div",57),c(2,"div",58),n(3,"div",59),f(4,Fe,2,0,"p",47),r()(),k()),t&2){m();let e=O(21);s(4),p("ngIf",e.errors.required)}}function We(t,g){if(t&1){let e=N();n(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),n(3,"h3",40),a(4," to "),n(5,"h6",41),a(6),r(),n(7,"i",42),u("click",function(){h(e);let o=m();return x(o.onEditDomain())}),r()()(),n(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),c(12,"i",45),r()(),n(13,"input",46,2),L("ngModelChange",function(o){h(e);let d=m();return I(d.username,o)||(d.username=o),x(o)}),r()(),f(15,je,5,1,"ng-container",47),n(16,"div",22)(17,"div",23)(18,"span"),c(19,"i",48),r()(),n(20,"input",49,3),L("ngModelChange",function(o){h(e);let d=m();return I(d.password,o)||(d.password=o),x(o)}),r(),f(22,Ve,2,1,"span",50),r(),f(23,Ue,5,1,"ng-container",47),n(24,"div",51)(25,"button",52),u("click",function(){h(e);let o=m();return x(o.onLogin())}),a(26," Log in "),r()(),n(27,"div",53),c(28,"hr"),n(29,"span",54),a(30,"or"),r(),c(31,"hr"),r(),n(32,"div")(33,"button",55),u("click",function(o){h(e);let d=m();return x(d.onLoginByGoogle(o))}),c(34,"i",56),a(35," Sign In with Google "),r()()()}if(t&2){let e=O(14),i=O(21),o=m();s(6),B(" (",o.subdomain,"",o.domain,") "),s(7),E("ngModel",o.username),s(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),s(5),p("type",o.passwordType)("ngClass",Y(9,Ae,o.browser=="edge",o.browser!="edge")),E("ngModel",o.password),s(2),p("ngIf",o.browser!="edge"),s(),p("ngIf",i.invalid&&(i.dirty||i.touched))}}var ve=(()=>{class t{constructor(e,i,o,d,Se){this._router=e,this.toastr=i,this.checkBrowser=o,this.authService=d,this.ngxPermission=Se,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:v.SHOOPE},{title:"Tokopedia",img:v.TOKOPEDIA},{title:"Tiktok",img:v.TIKTOK},{title:"Woocommerce",img:v.WOOCOMMERCE},{title:"Lazada",img:v.LAZADA},{title:"Shopify",img:v.SHOPIFY},{title:"Plugo",img:v.PLUGONEW}],this.version=me.version,this.news$=d.getNews().pipe(R(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username=e?.username,this.subdomain=e?.Host?.split(".")[0];let i=e?.Host?.split("dealpos");this.domain=`.dealpos${i[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ge.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");e!=-1&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let e={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(e).subscribe(i=>{this.onSuccessLogin(i)})}onLoginByGoogle(e){let i=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(e,i).subscribe(o=>{this.onSuccessLogin(o)})}onSuccessLogin(e){this.ngxPermission.hasPermission([pe.DashboardView]).then(i=>{i?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(i){return new(i||t)(l(C),l(ue),l(be),l(xe),l(fe))}}static{this.\u0275cmp=_({type:t,selectors:[["app-login"]],viewQuery:function(i,o){if(i&1&&U(Te,5),i&2){let d;W(d=q())&&(o.subdomainEl=d.first)}},standalone:!1,decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(i,o){if(i&1&&(n(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),c(5,"POS-news-swiper",8),G(6,"async"),r(),n(7,"div",9),f(8,ze,30,3,"ng-container",10)(9,We,36,12,"ng-template",null,0,K),r()(),n(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),c(14,"a",13),r(),n(15,"div",14)(16,"a",15),a(17),c(18,"i",16),r()()()),i&2){let d=O(10);s(5),p("newsList",Q(6,5,o.news$)),s(3),p("ngIf",o.loginState=="FORM_DOMAIN")("ngIfElse",d),s(8),p("href",o.changelogUrl,w),s(),H("version ",o.version,"")}},dependencies:[$,z,J,re,se,de,ee,ae,te,ne,ce,oe,ie,Ce,X],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]})}}return t})();var Me=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(o=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["shopee-authorized"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),n(13,"div"),a(14," Your shopID is "),n(15,"span",8),a(16),r()(),n(17,"button",9),u("click",function(){return o.addShopee()}),c(18,"i",10),a(19," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]})}}return t})();var Oe=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){let e={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["app-tiktok"]],standalone:!1,decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),r()(),n(17,"div"),a(18," Your State is "),n(19,"span",8),a(20),r()(),n(21,"button",9),u("click",function(){return o.addChannelTiktok()}),c(22,"i",10),a(23," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.code),s(4),b(o.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]})}}return t})();var Pe=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){let e={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["app-lazada"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),r()(),n(17,"button",9),u("click",function(){return o.addChannelLazada()}),c(18,"i",10),a(19," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.code))},encapsulation:2})}}return t})();var qe=[{path:"",component:ve,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Me,data:{title:"Success"}},{path:"tiktok",component:Oe,data:{title:"Success"}},{path:"lazada",component:Pe,data:{title:"Success"}}],ye=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=T({imports:[D.forChild(qe),D]})}}return t})();var Pt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=T({imports:[Z,le,ye,_e,he]})}}return t})();export{Pt as LoginModule};
|
|
1
|
+
import{a as pe}from"./chunk-UMP6ZMEJ.js";import{a as me,h as xe}from"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-GRIUDEPO.js";import{b as ue,e as y}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{e as _e}from"./chunk-5JVEEL2T.js";import{a as v,c as ge}from"./chunk-PW42BQIY.js";import{A as le,c as ee,h as te,i as ne,k as ie,m as oe,n as re,t as ae,u as se,v as de,w as ce}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{a as fe,c as he}from"./chunk-SWQXSJ7O.js";import{E as P,G as C,J as D,d as $,f as z,g as J,j as X,n as Z}from"./chunk-M2FCTYGU.js";import{$c as G,Ac as U,Bc as W,Cc as q,Fc as O,Gb as _,Gc as a,Hb as A,Hc as b,Ic as H,Jc as B,Kc as E,Lc as I,Mb as f,Mc as L,Tc as Y,Yb as p,Z as R,ac as F,ad as Q,cd as K,ic as n,ja as V,jc as r,ka as T,kc as c,lc as S,mc as k,oc as N,pb as w,rb as s,tc as u,uc as m,xb as l,ya as h,za as x}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var be=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=V({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Ie(t,g){if(t&1&&(n(0,"swiper-slide")(1,"div")(2,"a",2),c(3,"img",3),r()(),n(4,"a",4),a(5),r(),n(6,"p",5),a(7),r()()),t&2){let e=g.$implicit;s(2),p("href",e.href,w),s(),p("src",e.imgSrc,w),s(),p("href",e.href,w),s(),b(e.title),s(2),b(e.description)}}var Ce=(()=>{class t{constructor(){this.newsList=[]}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=_({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},standalone:!1,decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(i,o){i&1&&(n(0,"swiper-container",0),f(1,Ie,8,5,"swiper-slide",1),r()),i&2&&(s(),p("ngForOf",o.newsList))},dependencies:[z],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]})}}return t})();var Te=["subdomainEl"],Ae=(t,g)=>({"rounded-end":t,"border-end-0":g});function Ne(t,g){if(t&1&&(S(0),n(1,"div",36),c(2,"img",37),r(),k()),t&2){let e=g.$implicit;s(2),p("src",e.img,w)("title",e.title)("alt",e.title)}}function ze(t,g){if(t&1){let e=N();S(0),n(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),n(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),n(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),c(11,"i",24),r()(),n(12,"input",25,1),L("ngModelChange",function(o){h(e);let d=m();return I(d.subdomain,o)||(d.subdomain=o),x(o)}),r(),n(14,"div")(15,"select",26),L("ngModelChange",function(o){h(e);let d=m();return I(d.domain,o)||(d.domain=o),x(o)}),n(16,"option",27),a(17,".dealpos.co.id"),r(),n(18,"option",28),a(19,".dealpos.net"),r(),n(20,"option",29),a(21,".dealpos.com"),r(),n(22,"option",30),a(23,".dealpos.app"),r()()()(),n(24,"div",31)(25,"button",32),u("click",function(){h(e);let o=m();return x(o.onNextState())}),a(26," Next "),r()(),n(27,"div",33)(28,"div",34),f(29,Ne,3,3,"ng-container",35),r()()()(),k()}if(t&2){let e=m();s(12),E("ngModel",e.subdomain),s(3),E("ngModel",e.domain),s(14),p("ngForOf",e.channels)}}function De(t,g){t&1&&(n(0,"p"),a(1," Username is required "),r())}function je(t,g){if(t&1&&(S(0),n(1,"div",57),c(2,"div",58),n(3,"div",59),f(4,De,2,0,"p",47),r()(),k()),t&2){m();let e=O(14);s(4),p("ngIf",e.errors.required)}}function Re(t,g){if(t&1){let e=N();n(0,"i",62),u("click",function(){h(e);let o=m(3);return x(o.hideShowPassword())}),r()}if(t&2){let e=m(3);F("fa "+e.passwordIcon)}}function Ve(t,g){if(t&1&&(n(0,"span",60),f(1,Re,1,2,"i",61),r()),t&2){let e=m(2);s(),p("ngIf",e.password)}}function Fe(t,g){t&1&&(n(0,"p"),a(1," Password is required "),r())}function Ue(t,g){if(t&1&&(S(0),n(1,"div",57),c(2,"div",58),n(3,"div",59),f(4,Fe,2,0,"p",47),r()(),k()),t&2){m();let e=O(21);s(4),p("ngIf",e.errors.required)}}function We(t,g){if(t&1){let e=N();n(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),n(3,"h3",40),a(4," to "),n(5,"h6",41),a(6),r(),n(7,"i",42),u("click",function(){h(e);let o=m();return x(o.onEditDomain())}),r()()(),n(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),c(12,"i",45),r()(),n(13,"input",46,2),L("ngModelChange",function(o){h(e);let d=m();return I(d.username,o)||(d.username=o),x(o)}),r()(),f(15,je,5,1,"ng-container",47),n(16,"div",22)(17,"div",23)(18,"span"),c(19,"i",48),r()(),n(20,"input",49,3),L("ngModelChange",function(o){h(e);let d=m();return I(d.password,o)||(d.password=o),x(o)}),r(),f(22,Ve,2,1,"span",50),r(),f(23,Ue,5,1,"ng-container",47),n(24,"div",51)(25,"button",52),u("click",function(){h(e);let o=m();return x(o.onLogin())}),a(26," Log in "),r()(),n(27,"div",53),c(28,"hr"),n(29,"span",54),a(30,"or"),r(),c(31,"hr"),r(),n(32,"div")(33,"button",55),u("click",function(o){h(e);let d=m();return x(d.onLoginByGoogle(o))}),c(34,"i",56),a(35," Sign In with Google "),r()()()}if(t&2){let e=O(14),i=O(21),o=m();s(6),B(" (",o.subdomain,"",o.domain,") "),s(7),E("ngModel",o.username),s(2),p("ngIf",e.invalid&&(e.dirty||e.touched)),s(5),p("type",o.passwordType)("ngClass",Y(9,Ae,o.browser=="edge",o.browser!="edge")),E("ngModel",o.password),s(2),p("ngIf",o.browser!="edge"),s(),p("ngIf",i.invalid&&(i.dirty||i.touched))}}var ve=(()=>{class t{constructor(e,i,o,d,Se){this._router=e,this.toastr=i,this.checkBrowser=o,this.authService=d,this.ngxPermission=Se,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:v.SHOOPE},{title:"Tokopedia",img:v.TOKOPEDIA},{title:"Tiktok",img:v.TIKTOK},{title:"Woocommerce",img:v.WOOCOMMERCE},{title:"Lazada",img:v.LAZADA},{title:"Shopify",img:v.SHOPIFY},{title:"Plugo",img:v.PLUGONEW}],this.version=me.version,this.news$=d.getNews().pipe(R(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username=e?.username,this.subdomain=e?.Host?.split(".")[0];let i=e?.Host?.split("dealpos");this.domain=`.dealpos${i[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ge.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let e=this.subdomain.indexOf(".dealpos");e!=-1&&(this.subdomain=this.subdomain.substring(0,e))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let e={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(e).subscribe(i=>{this.onSuccessLogin(i)})}onLoginByGoogle(e){let i=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(e,i).subscribe(o=>{this.onSuccessLogin(o)})}onSuccessLogin(e){this.ngxPermission.hasPermission([pe.DashboardView]).then(i=>{i?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(i){return new(i||t)(l(C),l(ue),l(be),l(xe),l(fe))}}static{this.\u0275cmp=_({type:t,selectors:[["app-login"]],viewQuery:function(i,o){if(i&1&&U(Te,5),i&2){let d;W(d=q())&&(o.subdomainEl=d.first)}},standalone:!1,decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(i,o){if(i&1&&(n(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),c(5,"POS-news-swiper",8),G(6,"async"),r(),n(7,"div",9),f(8,ze,30,3,"ng-container",10)(9,We,36,12,"ng-template",null,0,K),r()(),n(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),c(14,"a",13),r(),n(15,"div",14)(16,"a",15),a(17),c(18,"i",16),r()()()),i&2){let d=O(10);s(5),p("newsList",Q(6,5,o.news$)),s(3),p("ngIf",o.loginState=="FORM_DOMAIN")("ngIfElse",d),s(8),p("href",o.changelogUrl,w),s(),H("version ",o.version,"")}},dependencies:[$,z,J,re,se,de,ee,ae,te,ne,ce,oe,ie,Ce,X],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]})}}return t})();var Me=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.shopID=e.shop_id,this.code=e.code})}addShopee(){let e={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",e).subscribe(o=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["shopee-authorized"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),n(13,"div"),a(14," Your shopID is "),n(15,"span",8),a(16),r()(),n(17,"button",9),u("click",function(){return o.addShopee()}),c(18,"i",10),a(19," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]})}}return t})();var Oe=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code,this.state=e.state})}addChannelTiktok(){let e={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["app-tiktok"]],standalone:!1,decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),r()(),n(17,"div"),a(18," Your State is "),n(19,"span",8),a(20),r()(),n(21,"button",9),u("click",function(){return o.addChannelTiktok()}),c(22,"i",10),a(23," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.code),s(4),b(o.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]})}}return t})();var Pe=(()=>{class t{constructor(e,i,o){this.route=e,this.http=i,this.service=o}ngOnInit(){this.route.queryParams.subscribe(e=>{this.code=e.code})}addChannelLazada(){let e={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",e).subscribe(i=>{this.service.navigate(["/menu/channel"])})}static{this.\u0275fac=function(i){return new(i||t)(l(P),l(y),l(C))}}static{this.\u0275cmp=_({type:t,selectors:[["app-lazada"]],standalone:!1,decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(i,o){i&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),c(5,"i",5),n(6,"div",6),a(7,"Success !"),r()(),n(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),n(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),n(13,"div"),a(14," Your Code is "),n(15,"span",8),a(16),r()(),n(17,"button",9),u("click",function(){return o.addChannelLazada()}),c(18,"i",10),a(19," Add to my Channel"),r()()()()()()),i&2&&(s(16),b(o.code))},encapsulation:2})}}return t})();var qe=[{path:"",component:ve,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Me,data:{title:"Success"}},{path:"tiktok",component:Oe,data:{title:"Success"}},{path:"lazada",component:Pe,data:{title:"Success"}}],ye=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=T({imports:[D.forChild(qe),D]})}}return t})();var Pt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=A({type:t})}static{this.\u0275inj=T({imports:[Z,le,ye,_e,he]})}}return t})();export{Pt as LoginModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as ht}from"./chunk-
|
|
1
|
+
import{c as ht}from"./chunk-K5GEJ2GZ.js";import"./chunk-3LRWABHB.js";import"./chunk-GIRXMYNI.js";import{b as ut}from"./chunk-YPWHTELF.js";import"./chunk-5OHRA4AS.js";import"./chunk-MH4SJTQX.js";import{a as Z}from"./chunk-UMP6ZMEJ.js";import"./chunk-CMTBBXR5.js";import{h as rt}from"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-GRIUDEPO.js";import{b as et,e as it}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{a as st,b as at,d as lt,e as ct}from"./chunk-5JVEEL2T.js";import{b as h,c as tt}from"./chunk-PW42BQIY.js";import{m as dt,n as gt}from"./chunk-UGVEAL7H.js";import{A as Y,h as Q,m as X}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{b as nt,c as ot}from"./chunk-SWQXSJ7O.js";import{r as mt,s as pt}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{J as y,f as J,g as G,j as q,n as L}from"./chunk-M2FCTYGU.js";import{$c as C,Fc as P,Gb as V,Gc as a,Hb as S,Hc as u,Ic as W,Kc as w,Lc as D,Mb as g,Mc as R,Nc as $,Oc as A,Pc as H,Sc as z,Yb as l,Z as M,aa as F,ad as x,cd as U,ea as k,ic as o,jc as r,ka as f,kc as j,lc as T,mc as N,oc as O,pb as K,q as B,rb as s,tc as I,uc as c,v,xb as _,ya as b,za as E}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var Ct=e=>[e];function xt(e,m){if(e&1&&(o(0,"span",15),j(1,"img",16),r(),o(2,"span"),a(3),r()),e&2){let t=m.item;s(),l("src",t.Img,K)("alt",t.Name),s(2),W(" ",t.Name," ")}}function Lt(e,m){if(e&1){let t=O();T(0),$(1),C(2,"async"),o(3,"a",17),I("click",function(){b(t);let n=H(1),p=c();return E(p.submitLogistics(n))}),a(4,"Submit"),r(),N()}if(e&2){let t=c();s(),A(x(2,0,t.logisticServices$))}}function yt(e,m){}function vt(e,m){if(e&1){let t=O();o(0,"ng-select",20),R("ngModelChange",function(n){b(t);let p=c(2).$implicit;return D(p.ProductSKU,n)||(p.ProductSKU=n),E(n)}),r()}if(e&2){let t=c().ngIf,i=c().$implicit;w("ngModel",i.ProductSKU),l("items",t)}}function Mt(e,m){if(e&1&&(o(0,"span"),a(1),r()),e&2){let t=c(2).$implicit;s(),u(t.ProductSKU||"-")}}function bt(e,m){if(e&1&&(T(0),g(1,yt,0,0,"ng-template",19)(2,vt,1,2,"ng-template",null,0,U)(4,Mt,2,1,"ng-template",null,1,U),N()),e&2){let t=P(3),i=P(5),n=c(2);s(),l("ngxPermissionsOnly",z(3,Ct,n.logisticEditRole))("ngxPermissionsOnlyThen",t)("ngxPermissionsOnlyElse",i)}}function Et(e,m){if(e&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td"),a(4),r(),o(5,"td"),a(6),r(),o(7,"td"),g(8,bt,6,5,"ng-container",18),C(9,"async"),r()()),e&2){let t=m.$implicit,i=c();s(2),u(t.Name),s(2),u(t.Service),s(2),u(t.TypeString),s(2),l("ngIf",x(9,4,i.logisticOptions$))}}var _t=(()=>{class e{constructor(t,i,n){this.http=t,this.toastr=i,this.authService=n,this.filter={ChannelID:""},this.logisticEditRole=Z.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let t=[h.WooCommerce,h.Lazada,h.Shopify,h.Plugo,h.Tokopedia];this.channelOptions=this.channelOptions.map(i=>(t.forEach(n=>{i.TypeID===n&&(i.disabled=!0)}),i))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(t=>{this.filter=t.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(M(1))}submitLogistics(t){this.clonedLogisticServices$.pipe(v(i=>t.map(n=>(i.findIndex(d=>d.Name===n.Name&&d.ProductSKU==n.ProductSKU)==-1&&(n.IsChange=!0),n))),F(i=>this.http.post("/api/Logistic/Submit",i))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(v(t=>t.map(i=>(i.ProductSKU=tt.IsEmpty(i.ProductSKU)?null:i.ProductSKU,i))),k(t=>{let i=JSON.parse(JSON.stringify(t));this.clonedLogisticServices$=B(i)}),M(1))}iniTitle(){let t=this.channelOptions.find(i=>i.ID==this.filter.ChannelID);this.channelName=t?t.Name:null}static{this.\u0275fac=function(i){return new(i||e)(_(it),_(et),_(rt))}}static{this.\u0275cmp=V({type:e,selectors:[["app-logistic"]],standalone:!1,decls:28,vars:9,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[4,"ngIf"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(i,n){i&1&&(o(0,"mainpanel",2),I("onSubmit",function(){return n.getLogisticService()}),o(1,"filters")(2,"div")(3,"label",3),a(4,"Select a Channel"),r(),o(5,"ng-select",4),R("ngModelChange",function(d){return D(n.filter.ChannelID,d)||(n.filter.ChannelID=d),d}),g(6,xt,4,3,"ng-template",5),r()()(),o(7,"actions"),g(8,Lt,5,3,"ng-container",6),r(),o(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),a(18,"Logistic"),r(),o(19,"th"),a(20,"Service"),r(),o(21,"th"),a(22,"Type"),r(),o(23,"th"),a(24,"Logistic Service"),r()()(),o(25,"tbody"),g(26,Et,10,6,"tr",14),C(27,"async"),r()()()()()()()()),i&2&&(l("headerTitle","Logistic Courier - "+n.channelName)("hideSearchDropdown",!1),s(5),l("clearable",!1)("items",n.channelOptions),w("ngModel",n.filter.ChannelID),s(3),l("ngxPermissionsOnly",n.logisticEditRole),s(18),l("ngForOf",x(27,7,n.logisticServices$)))},dependencies:[J,G,Q,X,dt,lt,st,at,mt,nt,q],encapsulation:2})}}return e})();var Tt=[{path:"",component:_t}],St=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y.forChild(Tt)]})}}return e})();var oe=(()=>{class e{static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275mod=S({type:e})}static{this.\u0275inj=f({imports:[L,y,St,Y,gt,ct,ut,ht,pt,ot]})}}return e})();export{oe as LogisticModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as i}from"./chunk-
|
|
1
|
+
import{a as i}from"./chunk-X743YBE6.js";import{a as h,b as f}from"./chunk-IMK2JGZA.js";import"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-GRIUDEPO.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-PW42BQIY.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{F as C,J as n,n as o}from"./chunk-M2FCTYGU.js";import{Gb as l,Hb as c,Yb as s,ic as u,jc as d,ka as p,kc as r,rb as m}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var v=(()=>{class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,P){t&1&&(u(0,"nav",0)(1,"div",1)(2,"div"),r(3,"nav-tab",2),d()()(),r(4,"router-outlet")),t&2&&(m(3),s("Tabs",P.priceTabs))},dependencies:[o,f,h,n,C],encapsulation:2})}}return e})();var M=[{path:"",component:v,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-G5DA2OSB.js").then(e=>e.PricePosChannelComponent)},canActivate:[i],data:{title:"Global Price Comparison"}},{path:"OutletPrice",loadComponent(){return import("./chunk-M6YFSBMG.js").then(e=>e.CustomChannelPriceComponent)},canActivate:[i],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-5W7TCSDK.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[i],data:{title:"Price Single Channel Comparison"}}]}],j=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=c({type:e})}static{this.\u0275inj=p({imports:[o,n.forChild(M)]})}}return e})();export{j as PriceRoutingModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f}from"./chunk-PW42BQIY.js";import{b as
|
|
1
|
+
import{c as f}from"./chunk-PW42BQIY.js";import{b as x,c as E,j as I,k as K}from"./chunk-UGVEAL7H.js";import{r as T}from"./chunk-IHNN4Q2N.js";import{d as V}from"./chunk-M2FCTYGU.js";import{Gb as b,Gc as m,Hc as h,Ra as _,Sc as S,Yb as p,ec as O,gc as v,hc as P,ic as o,jc as l,rb as d,tc as y,xb as g}from"./chunk-B7KTCPKC.js";var N=i=>({"bg-gradient-warning":i});function D(i,U){if(i&1&&(o(0,"tr",5)(1,"td"),m(2),l(),o(3,"td",6),m(4),l()()),i&2){let t=U.$implicit;p("matTooltip",t.duplicateMessage),d(2),h(t==null?null:t.Name),d(),p("ngClass",S(4,N,t.isDuplicate)),d(),h(t!=null&&t.ChannelVariationSKU?t==null?null:t.ChannelVariationSKU:"Not Assigned")}}var z=(()=>{class i{constructor(t,e){this.data=t,this.dialogRef=e,this.variants=_([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let t=this.data?.variants,e={},a=[],C=t.filter(n=>f.IsEmpty(n.ChannelVariationSKU));t.filter(n=>f.IsNotEmpty(n.ChannelVariationSKU)).forEach((n,r,M)=>{e[n.ChannelVariationSKU]=M.filter(s=>s.ChannelVariationSKU===n.ChannelVariationSKU)}),Object.keys(e).forEach(n=>{e[n].length>1&&(e[n]=e[n].map((r,M,s)=>{let u=`SKU ${r.ChannelVariationSKU} is duplicated with variant`;return s.forEach((c,k)=>{c.Name!==r.Name&&(u+=` ${s.length>2?c.Name+(k!==s.length-1?",":""):c.Name}`)}),r.duplicateMessage=u,r.isDuplicate=!0,r})),a.push(...e[n])}),a.push(...C),this.variants.set(a)}initModalConfig(){this.modalConfig=new I,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}static{this.\u0275fac=function(e){return new(e||i)(g(E),g(x))}}static{this.\u0275cmp=b({type:i,selectors:[["app-modal-variants"]],standalone:!1,decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,a){e&1&&(o(0,"modal-material",0),y("onCancel",function(){return a.dialogRef.close()}),o(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),m(6,"Variant"),l(),o(7,"th",4),m(8,"SKU"),l()()(),o(9,"tbody"),v(10,D,5,6,"tr",5,O),l()()()()),e&2&&(p("config",a.modalConfig),d(10),P(a.variants()))},dependencies:[V,T,K],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]})}}return i})();export{z as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R}from"./chunk-
|
|
1
|
+
import{a as R}from"./chunk-YM4TJJMM.js";import{b as V,c as A,j as D,k as P}from"./chunk-UGVEAL7H.js";import{h as U,m as b}from"./chunk-6QYD6NIJ.js";import{Gb as f,Gc as g,Hc as k,Kc as I,Lc as O,Mb as u,Mc as T,Yb as c,dc as M,ec as y,gc as w,hc as v,ic as l,jc as r,kc as S,oc as p,pb as _,rb as a,tc as h,uc as x,xb as m,ya as s,za as d}from"./chunk-B7KTCPKC.js";function j(o,C){if(o&1){let e=p();l(0,"span")(1,"mat-checkbox",4),h("change",function(t){s(e);let i=x();return d(i.onSelectAll(t==null?null:t.checked))}),l(2,"h5",5),g(3,"Select All"),r()()()}}function E(o,C){if(o&1){let e=p();l(0,"li")(1,"mat-checkbox",6),T("ngModelChange",function(t){let i=s(e).$implicit;return O(i.selected,t)||(i.selected=t),d(t)}),l(2,"div",7),S(3,"img",8),l(4,"h5",9),g(5),r()()()()}if(o&2){let e=C.$implicit;a(),I("ngModel",e.selected),a(2),c("src",e.Img,_),a(2),k(e.Name)}}var q=(()=>{class o{constructor(e,n){this.data=e,this.dialogRef=n,this.selectedItems=this.data.selectedItems,this.channels=this.data.channels}ngOnInit(){this.initModalConfig()}initModalConfig(){let e=this.data.title?this.data.title:"Updating Inventory";this.modalConfig=new D,this.modalConfig.title=e}onSelectAll(e){this.channels=this.channels.map(n=>(n.selected=e,n))}onOk(){this.dialogRef.close(this.channels)}onClose(){this.dialogRef.close()}getSelectedChannel(){return this.channels.filter(e=>e.selected)}static{this.\u0275fac=function(n){return new(n||o)(m(A),m(V))}}static{this.\u0275cmp=f({type:o,selectors:[["app-modal-update-channels"]],standalone:!1,decls:7,vars:3,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[2,"overflow-y","auto","max-height","28rem"],[1,"no-bullet",2,"margin-bottom","0px !important","overflow","hidden"],["color","primary",1,"me-6",3,"change"],[1,"fw-light"],["color","primary",3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center"],[1,"channelLogo-md",3,"src"],[1,"fw-light","ms-2","my-auto"]],template:function(n,t){if(n&1&&(l(0,"modal-material",0),h("onOk",function(){return t.onOk()})("onClose",function(){return t.onClose()})("onCancel",function(){return t.onClose()}),l(1,"div",1)(2,"div",2),u(3,j,4,0,"span"),l(4,"ul",3),w(5,E,6,3,"li",null,y),r()()()()),n&2){let i;c("dynamicValidated",((i=t.getSelectedChannel())==null?null:i.length)>0)("config",t.modalConfig),a(3),M((t.channels==null?null:t.channels.length)>1?3:-1),a(2),v(t.channels)}},dependencies:[U,b,R,P],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}"]})}}return o})();export{q as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as he}from"./chunk-2OVYEC6Q.js";import{a as pe}from"./chunk-3NMM37H7.js";import"./chunk-BFU7VKO3.js";import{a as de}from"./chunk-SRVGUGY2.js";import{a as D}from"./chunk-XHAXYWZ7.js";import{c as me,d as R}from"./chunk-5BSS4CVK.js";import"./chunk-CIIO2CJ6.js";import"./chunk-OC2FBL33.js";import"./chunk-NS46QSCM.js";import{a as ce}from"./chunk-LOBNKJGT.js";import"./chunk-M5XGP4SG.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SYUFPF3D.js";import"./chunk-5OHRA4AS.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-3BT5DR3X.js";import"./chunk-EH6HWI3G.js";import"./chunk-E3ROEHBW.js";import"./chunk-OLOIQI4D.js";import"./chunk-IA6KOBDJ.js";import"./chunk-RECNBAEB.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import"./chunk-5KS4WK6H.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{a as ee}from"./chunk-UMP6ZMEJ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import"./chunk-CMTBBXR5.js";import{h as w}from"./chunk-UG7VRDLB.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{c as C}from"./chunk-PW42BQIY.js";import{b as ie,c as ae}from"./chunk-SWQXSJ7O.js";import"./chunk-DRMAONR7.js";import"./chunk-AEOSNAHH.js";import{b as te,e as ne}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{d as oe,l as re,m as le,n as se}from"./chunk-CLER2MX6.js";import{A as Z,c as K,h as q,m as X,o as Y}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{g as $,j as Q,n as J}from"./chunk-M2FCTYGU.js";import{$c as I,G as U,Gb as A,Gc as v,Kc as T,Lc as E,Mb as u,Mc as x,Qc as H,Ra as M,Sc as z,Yb as h,ad as y,ea as k,ic as s,ja as j,jc as p,kc as G,lc as N,mc as F,nc as W,oc as L,pa as S,rb as c,tc as g,uc as m,xb as d,ya as b,za as P}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as V,b as B}from"./chunk-66YHNWRR.js";var O=(()=>{class o{constructor(){this.authService=S(w),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(t,i){let e=Object.assign([],this.channelOptions),n=[],a;return t.forEach(r=>{a=e.find(l=>l.ID==r?.parent?.id),a&&(a=B(V({},a),{Name:`${r?.parent?.label} - ${r?.label}`,LocationID:r?.id}),n.push(a))}),i.forEach(r=>{a=e.find(l=>l.ID==r.id),a&&n.push(a)}),n}generateFilterLocation(t,i){let e=[],n=[],a=[];return t.length>0?(e=t.map(r=>r.id),n=t.filter(r=>C.IsNotEmpty(r?.parent?.id)).map(r=>r?.parent?.id).filter((r,l,_)=>_.indexOf(r)===l)):(e=[],n=[]),a=i.map(r=>r.id),a=a.concat(n).filter((r,l,_)=>_.indexOf(r)===l),{locationIds:e,channelIds:a}}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=j({token:o,factory:o.\u0275fac})}}return o})();var ge=o=>[o];function Ce(o,f){if(o&1){let t=L();s(0,"button",16),g("click",function(){b(t);let e=m(2).ngIf,n=m();return P(n.onUpdateItems(e))}),G(1,"i",17),v(2," Update "),p()}}function fe(o,f){if(o&1&&(N(0),u(1,Ce,3,0,"button",15),F()),o&2){let t=m().ngIf,i=m();c(),h("ngIf",i.productService.hasSelectionVariant(t))}}function _e(o,f){if(o&1&&(s(0,"actions")(1,"div",13),u(2,fe,2,1,"ng-container",14),p()()),o&2){let t=m();c(2),h("ngxPermissionsOnly",z(1,ge,t.inventoryUpdateRole))}}function Se(o,f){o&1&&W(0)}function ve(o,f){if(o&1){let t=L();N(0),s(1,"app-table",18),g("onToggle",function(e){b(t);let n=m();return P(n.onShowDifferenceStock(e))})("onSubmit",function(e){b(t);let n=m();return P(n.updateStockByVariant(e))}),p(),F()}if(o&2){let t=f.ngIf,i=m();c(),h("data",t)("channel",i.channels())("showProductToggle",!0)("hiddenIPOSInventory",i.searchFilter.HiddenIPOSInventory)}}var et=(()=>{class o{constructor(t,i,e,n,a,r){this.http=t,this.toastr=i,this.dialog=e,this.productService=n,this.authService=a,this.mainPanelService=r,this.paginationService=S(R),this.multiChannelService=S(O),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=M([]),this.selectedChannels=M([]),this.channels=M([]),this.inventoryUpdateRole=ee.InventoryUpdate,this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:D.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(t=[]){let i=t.filter(n=>C.isValidGUID(n.id)==!1),e=t.filter(n=>C.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(e)}onSearch(t){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,i){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let n=[];e.forEach(l=>{l.Channel?.forEach(_=>{n.push({ID:l.ID,Code:l.Code,Inventory:l.Inventory,LocationID:_.LocationID})})});let r={ListChannelID:i.filter(l=>l.selected).map(l=>l.ID),List:n};this.http.post("/api/Inventory/UpdateChannel",r).subscribe(l=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+r.List.length+" variants in "+r.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku,LocationID:t.LocationID};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(e=>{this.paginationService.reloadPagination(this.searchFilter);let n=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+n.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let i=this.productService.selectedVariantProduct(t),e=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(pe,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(U(n=>C.IsNotEmpty(n))).subscribe(n=>{this.updateStock(t,n)})}static{this.\u0275fac=function(i){return new(i||o)(d(ne),d(te),d(oe),d(ce),d(w),d(re))}}static{this.\u0275cmp=A({type:o,selectors:[["app-multi-channel-comparison"]],features:[H([R,O])],decls:26,vars:22,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","pageData","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,e){i&1&&(s(0,"mainpanel",0),g("onSubmit",function(a){return e.onSearch(a)}),u(1,_e,3,3,"actions",1),I(2,"async"),s(3,"filters"),u(4,Se,1,0,"ng-container",1),I(5,"async"),s(6,"div")(7,"label",2),v(8,"Channel"),p(),s(9,"multiwarehouse-tree-select",3),g("onChannelChange",function(a){return e.onChannelChange(a)}),p()(),s(10,"div",4)(11,"label",5),v(12,"PageNumber"),p(),s(13,"input",6),x("ngModelChange",function(a){return E(e.searchFilter.PageNumber,a)||(e.searchFilter.PageNumber=a),a}),p()(),s(14,"div",4)(15,"label",7),v(16,"Page Size"),p(),s(17,"input",8),x("ngModelChange",function(a){return E(e.searchFilter.RowCount,a)||(e.searchFilter.RowCount=a),a}),p()()(),s(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),u(22,ve,2,4,"ng-container",1),I(23,"async"),s(24,"infinite-paginator",12),I(25,"async"),g("onNextPage",function(){return e.paginationService.onNextPage(e.searchFilter)})("onLastPage",function(){return e.paginationService.onLastPage(e.searchFilter)})("onGetRowCount",function(){return e.paginationService.getRowCount(e.searchFilter)}),p()()()()()()),i&2&&(h("pageData",e.pageData)("hideSearchBox",!1),c(),h("ngIf",y(2,14,e.paginationService.data$)),c(3),h("ngIf",y(5,16,e.loader$)),c(5),h("multiple",!0),c(4),T("ngModel",e.searchFilter.PageNumber),c(4),T("ngModel",e.searchFilter.RowCount),c(5),h("ngIf",y(23,18,e.paginationService.data$)),c(2),h("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",y(25,20,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage()))},dependencies:[J,$,Q,se,le,he,Z,K,Y,q,X,me,de,ae,ie],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return o})();export{et as MultiChannelComparison};
|
|
1
|
+
import{a as he}from"./chunk-UUSBNUEH.js";import{a as pe}from"./chunk-P7NATRFC.js";import"./chunk-YM4TJJMM.js";import{a as de}from"./chunk-AO46RPZ4.js";import"./chunk-5KS4WK6H.js";import{a as D}from"./chunk-XHAXYWZ7.js";import{c as me,d as R}from"./chunk-3OIE7ARG.js";import"./chunk-YPWHTELF.js";import"./chunk-OC2FBL33.js";import"./chunk-NS46QSCM.js";import"./chunk-EH6HWI3G.js";import"./chunk-E3ROEHBW.js";import"./chunk-OLOIQI4D.js";import"./chunk-RECNBAEB.js";import"./chunk-IA6KOBDJ.js";import"./chunk-M5XGP4SG.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as ce}from"./chunk-TPW56VWM.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SYUFPF3D.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import{a as ee}from"./chunk-UMP6ZMEJ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import"./chunk-CMTBBXR5.js";import"./chunk-3VUDKIND.js";import{h as w}from"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-GRIUDEPO.js";import{b as te,e as ne}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{c as C}from"./chunk-PW42BQIY.js";import{d as oe,l as re,m as le,n as se}from"./chunk-UGVEAL7H.js";import{A as Z,c as K,h as q,m as X,o as Y}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{b as ie,c as ae}from"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{g as $,j as Q,n as J}from"./chunk-M2FCTYGU.js";import{$c as I,G as U,Gb as A,Gc as v,Kc as T,Lc as E,Mb as u,Mc as x,Qc as H,Ra as M,Sc as z,Yb as h,ad as y,ea as k,ic as s,ja as j,jc as p,kc as G,lc as N,mc as F,nc as W,oc as L,pa as S,rb as c,tc as g,uc as m,xb as d,ya as b,za as P}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as V,b as B}from"./chunk-66YHNWRR.js";var O=(()=>{class o{constructor(){this.authService=S(w),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(t,i){let e=Object.assign([],this.channelOptions),n=[],a;return t.forEach(r=>{a=e.find(l=>l.ID==r?.parent?.id),a&&(a=B(V({},a),{Name:`${r?.parent?.label} - ${r?.label}`,LocationID:r?.id}),n.push(a))}),i.forEach(r=>{a=e.find(l=>l.ID==r.id),a&&n.push(a)}),n}generateFilterLocation(t,i){let e=[],n=[],a=[];return t.length>0?(e=t.map(r=>r.id),n=t.filter(r=>C.IsNotEmpty(r?.parent?.id)).map(r=>r?.parent?.id).filter((r,l,_)=>_.indexOf(r)===l)):(e=[],n=[]),a=i.map(r=>r.id),a=a.concat(n).filter((r,l,_)=>_.indexOf(r)===l),{locationIds:e,channelIds:a}}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=j({token:o,factory:o.\u0275fac})}}return o})();var ge=o=>[o];function Ce(o,f){if(o&1){let t=L();s(0,"button",16),g("click",function(){b(t);let e=m(2).ngIf,n=m();return P(n.onUpdateItems(e))}),G(1,"i",17),v(2," Update "),p()}}function fe(o,f){if(o&1&&(N(0),u(1,Ce,3,0,"button",15),F()),o&2){let t=m().ngIf,i=m();c(),h("ngIf",i.productService.hasSelectionVariant(t))}}function _e(o,f){if(o&1&&(s(0,"actions")(1,"div",13),u(2,fe,2,1,"ng-container",14),p()()),o&2){let t=m();c(2),h("ngxPermissionsOnly",z(1,ge,t.inventoryUpdateRole))}}function Se(o,f){o&1&&W(0)}function ve(o,f){if(o&1){let t=L();N(0),s(1,"app-table",18),g("onToggle",function(e){b(t);let n=m();return P(n.onShowDifferenceStock(e))})("onSubmit",function(e){b(t);let n=m();return P(n.updateStockByVariant(e))}),p(),F()}if(o&2){let t=f.ngIf,i=m();c(),h("data",t)("channel",i.channels())("showProductToggle",!0)("hiddenIPOSInventory",i.searchFilter.HiddenIPOSInventory)}}var et=(()=>{class o{constructor(t,i,e,n,a,r){this.http=t,this.toastr=i,this.dialog=e,this.productService=n,this.authService=a,this.mainPanelService=r,this.paginationService=S(R),this.multiChannelService=S(O),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=M([]),this.selectedChannels=M([]),this.channels=M([]),this.inventoryUpdateRole=ee.InventoryUpdate,this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:D.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(t=[]){let i=t.filter(n=>C.isValidGUID(n.id)==!1),e=t.filter(n=>C.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(e)}onSearch(t){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,i){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let n=[];e.forEach(l=>{l.Channel?.forEach(_=>{n.push({ID:l.ID,Code:l.Code,Inventory:l.Inventory,LocationID:_.LocationID})})});let r={ListChannelID:i.filter(l=>l.selected).map(l=>l.ID),List:n};this.http.post("/api/Inventory/UpdateChannel",r).subscribe(l=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+r.List.length+" variants in "+r.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku,LocationID:t.LocationID};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(e=>{this.paginationService.reloadPagination(this.searchFilter);let n=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+n.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=D.DIFFERENCE:this.searchFilter.filterModel=D.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let i=this.productService.selectedVariantProduct(t),e=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(pe,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(U(n=>C.IsNotEmpty(n))).subscribe(n=>{this.updateStock(t,n)})}static{this.\u0275fac=function(i){return new(i||o)(d(ne),d(te),d(oe),d(ce),d(w),d(re))}}static{this.\u0275cmp=A({type:o,selectors:[["app-multi-channel-comparison"]],features:[H([R,O])],decls:26,vars:22,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","pageData","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],[4,"ngxPermissionsOnly"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,e){i&1&&(s(0,"mainpanel",0),g("onSubmit",function(a){return e.onSearch(a)}),u(1,_e,3,3,"actions",1),I(2,"async"),s(3,"filters"),u(4,Se,1,0,"ng-container",1),I(5,"async"),s(6,"div")(7,"label",2),v(8,"Channel"),p(),s(9,"multiwarehouse-tree-select",3),g("onChannelChange",function(a){return e.onChannelChange(a)}),p()(),s(10,"div",4)(11,"label",5),v(12,"PageNumber"),p(),s(13,"input",6),x("ngModelChange",function(a){return E(e.searchFilter.PageNumber,a)||(e.searchFilter.PageNumber=a),a}),p()(),s(14,"div",4)(15,"label",7),v(16,"Page Size"),p(),s(17,"input",8),x("ngModelChange",function(a){return E(e.searchFilter.RowCount,a)||(e.searchFilter.RowCount=a),a}),p()()(),s(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),u(22,ve,2,4,"ng-container",1),I(23,"async"),s(24,"infinite-paginator",12),I(25,"async"),g("onNextPage",function(){return e.paginationService.onNextPage(e.searchFilter)})("onLastPage",function(){return e.paginationService.onLastPage(e.searchFilter)})("onGetRowCount",function(){return e.paginationService.getRowCount(e.searchFilter)}),p()()()()()()),i&2&&(h("pageData",e.pageData)("hideSearchBox",!1),c(),h("ngIf",y(2,14,e.paginationService.data$)),c(3),h("ngIf",y(5,16,e.loader$)),c(5),h("multiple",!0),c(4),T("ngModel",e.searchFilter.PageNumber),c(4),T("ngModel",e.searchFilter.RowCount),c(5),h("ngIf",y(23,18,e.paginationService.data$)),c(2),h("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",y(25,20,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage()))},dependencies:[J,$,Q,se,le,he,Z,K,Y,q,X,me,de,ae,ie],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return o})();export{et as MultiChannelComparison};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as U}from"./chunk-74IXJYWO.js";import{a as K}from"./chunk-
|
|
1
|
+
import{a as U}from"./chunk-74IXJYWO.js";import{a as K}from"./chunk-GIRXMYNI.js";import{d as G}from"./chunk-MH4SJTQX.js";import{a as Q}from"./chunk-CMTBBXR5.js";import{C as B,D as L,L as g,m as z,n as H}from"./chunk-EQIFZBRG.js";import{Ac as V,Bc as T,Cc as P,Gb as R,Gc as A,Hb as m,Ic as j,Ka as k,Mb as b,Pa as C,Qa as w,Xb as S,Yb as d,_b as D,dc as p,f as M,ic as _,jc as v,jd as N,ka as c,kc as u,ma as f,od as F,pa as r,pc as O,rb as l,tc as E,uc as h,vc as I,wc as y}from"./chunk-B7KTCPKC.js";var X=["text"],Z=[[["mat-icon"]],"*"],$=["mat-icon","*"];function tt(e,a){if(e&1&&u(0,"mat-pseudo-checkbox",1),e&2){let t=h();d("disabled",t.disabled)("state",t.selected?"checked":"unchecked")}}function et(e,a){if(e&1&&u(0,"mat-pseudo-checkbox",3),e&2){let t=h();d("disabled",t.disabled)}}function it(e,a){if(e&1&&(_(0,"span",4),A(1),v()),e&2){let t=h();l(),j("(",t.group.label,")")}}var ot=new f("MAT_OPTION_PARENT_COMPONENT"),at=new f("MatOptgroup");var x=class{source;isUserInput;constructor(a,t=!1){this.source=a,this.isUserInput=t}},yt=(()=>{class e{_element=r(C);_changeDetectorRef=r(N);_parent=r(ot,{optional:!0});group=r(at,{optional:!0});_signalDisableRipple=!1;_selected=!1;_active=!1;_disabled=!1;_mostRecentViewValue="";get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}value;id=r(B).getId("mat-option-");get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(t){this._disabled=t}get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}onSelectionChange=new k;_text;_stateChanges=new M;constructor(){let t=r(z);t.load(Q),t.load(H),this._signalDisableRipple=!!this._parent&&w(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(t=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}deselect(t=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),t&&this._emitSelectionChangeEvent())}focus(t,o){let i=this._getHostElement();typeof i.focus=="function"&&i.focus(o)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(t){(t.keyCode===13||t.keyCode===32)&&!L(t)&&(this._selectViaInteraction(),t.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let t=this.viewValue;t!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=t)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(t=!1){this.onSelectionChange.emit(new x(this,t))}static \u0275fac=function(o){return new(o||e)};static \u0275cmp=R({type:e,selectors:[["mat-option"]],viewQuery:function(o,i){if(o&1&&V(X,7),o&2){let n;T(n=P())&&(i._text=n.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(o,i){o&1&&E("click",function(){return i._selectViaInteraction()})("keydown",function(s){return i._handleKeydown(s)}),o&2&&(O("id",i.id),S("aria-selected",i.selected)("aria-disabled",i.disabled.toString()),D("mdc-list-item--selected",i.selected)("mat-mdc-option-multiple",i.multiple)("mat-mdc-option-active",i.active)("mdc-list-item--disabled",i.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",F]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],ngContentSelectors:$,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(o,i){o&1&&(I(Z),b(0,tt,1,2,"mat-pseudo-checkbox",1),y(1),_(2,"span",2,0),y(4,1),v(),b(5,et,1,1,"mat-pseudo-checkbox",3)(6,it,2,1,"span",4),u(7,"div",5)),o&2&&(p(i.multiple?0:-1),l(5),p(!i.multiple&&i.selected&&!i.hideSingleSelectionIndicator?5:-1),l(),p(i.group&&i.group._inert?6:-1),l(),d("matRippleTrigger",i._getHostElement())("matRippleDisabled",i.disabled||i.disableRipple))},dependencies:[U,G],styles:[`.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:""}
|
|
2
2
|
`],encapsulation:2,changeDetection:0})}return e})();function xt(e,a,t){if(t.length){let o=a.toArray(),i=t.toArray(),n=0;for(let s=0;s<e+1;s++)o[s].group&&o[s].group===i[n]&&n++;return n}return 0}function Mt(e,a,t,o){return e<t?e:e+a>t+o?Math.max(0,e-o+a):t}var Y=(()=>{class e{static \u0275fac=function(o){return new(o||e)};static \u0275mod=m({type:e});static \u0275inj=c({imports:[g]})}return e})();var Ot=(()=>{class e{static \u0275fac=function(o){return new(o||e)};static \u0275mod=m({type:e});static \u0275inj=c({imports:[K,g,Y]})}return e})();export{ot as a,at as b,yt as c,xt as d,Mt as e,Ot as f};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as we}from"./chunk-
|
|
1
|
+
import{a as we}from"./chunk-TPC5KHGH.js";import{a as ft}from"./chunk-WUHNNJ2C.js";import{a as bt}from"./chunk-AJL3CYNX.js";import{a as _t}from"./chunk-IA6KOBDJ.js";import{a as ht,c as mt,d as gt}from"./chunk-SB7NWPDS.js";import{a as yt}from"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as ae}from"./chunk-UMP6ZMEJ.js";import"./chunk-OZ7LWNOK.js";import{a as Ce}from"./chunk-ECRWEMEV.js";import{M as ce,O as C,P as M,Q as Oe,S as ve,W as ct,Y as lt,ba as rt,f as tt,fa as pt,ia as dt,ja as U,k as it,ka as ut,n as nt,q as ot,r as se,w as at,z as st}from"./chunk-LZCEM2PC.js";import"./chunk-GRIUDEPO.js";import{b as je}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as Ze,n as et}from"./chunk-UGVEAL7H.js";import{A as Ue,a as qe,b as ze,h as Qe,m as We}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{a as Xe,b as Je,c as Ye}from"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{H as Ne,J as He,d as _e,f as Ke,g as ye,h as Re,i as be,j as Ae,m as Be,n as W}from"./chunk-M2FCTYGU.js";import{$b as Ee,$c as ne,Ac as B,Bc as O,Ca as ke,Cc as v,Fc as te,Gb as A,Gc as g,Hb as Me,Hc as R,Ic as $,Ka as w,Kb as pe,Kc as N,Lc as H,Mb as m,Mc as q,Nc as ue,Oc as Pe,Pc as he,Qc as ie,Ra as V,Rc as fe,Sc as z,Tc as $e,Xb as _,Yb as r,Z as le,ac as Z,ad as oe,cd as Q,dc as de,ec as Le,gc as Fe,hc as Ge,ia as Ie,ic as d,ja as Te,jc as u,ka as Se,kc as P,lc as x,mc as I,nc as ee,oc as T,od as S,pa as K,pd as me,q as xe,rb as c,rd as ge,sd as De,tc as y,uc as p,xa as Ve,xb as re,ya as h,za as f,zc as k}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as L,b as F}from"./chunk-66YHNWRR.js";var xt=t=>({$implicit:t});function It(t,s){t&1&&ee(0)}function Tt(t,s){if(t&1&&(x(0),m(1,It,1,0,"ng-container",8),I()),t&2){let e=p().$implicit,n=p();c(),r("ngTemplateOutlet",n.optionTemplate)("ngTemplateOutletContext",z(2,xt,e==null?null:e.option))}}function St(t,s){if(t&1&&(d(0,"span",9),g(1),u()),t&2){let e=p().$implicit,n=p();_("data-pc-section","text"),c(),R(n.getOptionLabelToRender(e))}}function Vt(t,s){t&1&&P(0,"AngleRightIcon")}function kt(t,s){}function Mt(t,s){t&1&&m(0,kt,0,0,"ng-template")}function Et(t,s){if(t&1&&(d(0,"span",10),m(1,Vt,1,0,"AngleRightIcon",11)(2,Mt,1,0,null,12),u()),t&2){let e=p(2);_("data-pc-section","groupIcon"),c(),r("ngIf",!e.groupicon),c(),r("ngTemplateOutlet",e.groupicon)}}function Lt(t,s){if(t&1){let e=T();d(0,"p-cascadeselect-sub",13),y("onChange",function(i){h(e);let o=p(2);return f(o.onChange.emit(i))})("onFocusChange",function(i){h(e);let o=p(2);return f(o.onFocusChange.emit(i))})("onFocusEnterChange",function(i){h(e);let o=p(2);return f(o.onFocusEnterChange.emit(i))}),u()}if(t&2){let e=p().$implicit,n=p();r("role","group")("selectId",n.selectId)("focusedOptionId",n.focusedOptionId)("activeOptionPath",n.activeOptionPath)("options",n.getOptionGroupChildren(e))("optionLabel",n.optionLabel)("optionValue",n.optionValue)("level",n.level+1)("optionGroupLabel",n.optionGroupLabel)("optionGroupChildren",n.optionGroupChildren)("dirty",n.dirty)("optionTemplate",n.optionTemplate)}}function Ft(t,s){if(t&1){let e=T();d(0,"li",3)(1,"div",4),y("click",function(i){let o=h(e).$implicit,a=p();return f(a.onOptionClick(i,o))})("mouseenter",function(i){let o=h(e).$implicit,a=p();return f(a.onOptionMouseEnter(i,o))})("mousemove",function(i){let o=h(e).$implicit,a=p();return f(a.onOptionMouseMove(i,o))}),m(2,Tt,2,4,"ng-container",5)(3,St,2,2,"ng-template",null,0,Q)(5,Et,3,3,"span",6),u(),m(6,Lt,1,12,"p-cascadeselect-sub",7),u()}if(t&2){let e=s.$implicit,n=s.index,i=te(4),o=p();r("ngClass",o.getItemClass(e))("id",o.getOptionId(e)),_("aria-level",o.level+1)("aria-setsize",o.options.length)("data-pc-section","item")("aria-label",o.getOptionLabelToRender(e))("aria-selected",o.isOptionGroup(e)?void 0:o.isOptionSelected(e))("aria-posinset",n+1),c(),_("data-pc-section","content"),c(),r("ngIf",o.optionTemplate)("ngIfElse",i),c(3),r("ngIf",o.isOptionGroup(e)),c(),r("ngIf",o.isOptionGroup(e)&&o.isOptionActive(e))}}var Gt=["value"],Pt=["option"],$t=["header"],Dt=["footer"],Kt=["triggericon"],Rt=["loadingicon"],At=["optiongroupicon"],Bt=["clearicon"],Nt=["focusInput"],Ht=["container"],qt=["panel"],zt=["overlay"],Qt=(t,s)=>({$implicit:t,placeholder:s}),Wt=t=>({"p-cascadeselect-overlay p-component":!0,"p-cascadeselect-mobile-active":t});function Ut(t,s){t&1&&ee(0)}function jt(t,s){if(t&1&&(x(0),m(1,Ut,1,0,"ng-container",16),I()),t&2){let e=p();c(),r("ngTemplateOutlet",e.valueTemplate||e._valueTemplate)("ngTemplateOutletContext",$e(2,Qt,e.value,e.placeholder))}}function Xt(t,s){if(t&1&&g(0),t&2){let e=p();$(" ",e.label()," ")}}function Jt(t,s){if(t&1){let e=T();d(0,"TimesIcon",18),y("click",function(i){h(e);let o=p(2);return f(o.clear(i))}),u()}t&2&&_("data-pc-section","clearicon")("aria-hidden",!0)}function Yt(t,s){}function Zt(t,s){t&1&&m(0,Yt,0,0,"ng-template")}function ei(t,s){if(t&1){let e=T();d(0,"span",18),y("click",function(i){h(e);let o=p(2);return f(o.clear(i))}),m(1,Zt,1,0,null,19),u()}if(t&2){let e=p(2);_("data-pc-section","clearicon")("aria-hidden",!0),c(),r("ngTemplateOutlet",e.clearIconTemplate||e._clearIconTemplate)}}function ti(t,s){if(t&1&&(x(0),m(1,Jt,1,2,"TimesIcon",17)(2,ei,2,3,"span",17),I()),t&2){let e=p();c(),r("ngIf",!e.clearIconTemplate&&!e._clearIconTemplate),c(),r("ngIf",e.clearIconTemplate||e._clearIconTemplate)}}function ii(t,s){t&1&&ee(0)}function ni(t,s){if(t&1&&(x(0),m(1,ii,1,0,"ng-container",19),I()),t&2){let e=p(2);c(),r("ngTemplateOutlet",e.loadingIconTemplate||e._loadingIconTemplate)}}function oi(t,s){if(t&1&&P(0,"span",22),t&2){let e=p(3);r("ngClass","p-cascadeselect-loading-icon pi-spin "+e.loadingIcon)}}function ai(t,s){t&1&&P(0,"span",23),t&2&&Z("p-cascadeselect-loading-icon pi pi-spinner pi-spin")}function si(t,s){if(t&1&&(x(0),m(1,oi,1,1,"span",20)(2,ai,1,2,"span",21),I()),t&2){let e=p(2);c(),r("ngIf",e.loadingIcon),c(),r("ngIf",!e.loadingIcon)}}function ci(t,s){if(t&1&&(x(0),m(1,ni,2,1,"ng-container",12)(2,si,3,2,"ng-container",12),I()),t&2){let e=p();c(),r("ngIf",e.loadingIconTemplate||e._loadingIconTemplate),c(),r("ngIf",!e.loadingIconTemplate&&!e._loadingIconTemplate)}}function li(t,s){t&1&&P(0,"ChevronDownIcon",26),t&2&&r("styleClass","p-cascadeselect-dropdown-icon")}function ri(t,s){}function pi(t,s){t&1&&m(0,ri,0,0,"ng-template")}function di(t,s){if(t&1&&(d(0,"span",27),m(1,pi,1,0,null,19),u()),t&2){let e=p(2);c(),r("ngTemplateOutlet",e.triggerIconTemplate||e._triggerIconTemplate)}}function ui(t,s){if(t&1&&m(0,li,1,1,"ChevronDownIcon",24)(1,di,2,1,"span",25),t&2){let e=p();r("ngIf",!e.triggerIconTemplate&&!e._triggerIconTemplate),c(),r("ngIf",e.triggerIconTemplate||e._triggerIconTemplate)}}function hi(t,s){}function fi(t,s){t&1&&m(0,hi,0,0,"ng-template")}function mi(t,s){}function gi(t,s){t&1&&m(0,mi,0,0,"ng-template")}function _i(t,s){if(t&1){let e=T();d(0,"div",28,6),m(2,fi,1,0,null,19),d(3,"div",29)(4,"p-cascadeselect-sub",30),y("onChange",function(i){h(e);let o=p();return f(o.onOptionClick(i))})("onFocusChange",function(i){h(e);let o=p();return f(o.onOptionMouseMove(i))})("onFocusEnterChange",function(i){h(e);let o=p();return f(o.onOptionMouseEnter(i))}),u()(),d(5,"span",14),g(6),u(),m(7,gi,1,0,null,19),u()}if(t&2){let e=p();Z(e.panelStyleClass),r("ngClass",z(24,Wt,e.queryMatches()))("ngStyle",e.panelStyle),_("data-pc-section","panel"),c(2),r("ngTemplateOutlet",e.headerTemplate||e._headerTemplate),c(),_("data-pc-section","wrapper"),c(),r("options",e.processedOptions)("selectId",e.id)("focusedOptionId",e.focused?e.focusedOptionId:void 0)("activeOptionPath",e.activeOptionPath())("optionLabel",e.optionLabel)("optionValue",e.optionValue)("level",0)("optionTemplate",e.optionTemplate||e._optionTemplate)("groupicon",e.groupIconTemplate||e.groupIconTemplate)("optionGroupLabel",e.optionGroupLabel)("optionGroupChildren",e.optionGroupChildren)("optionDisabled",e.optionDisabled)("root",!0)("dirty",e.dirty)("role","tree"),c(2),$(" ",e.selectedMessageText," "),c(),r("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)}}var yi=({dt:t})=>`
|
|
2
2
|
.p-cascadeselect {
|
|
3
3
|
display: inline-flex;
|
|
4
4
|
cursor: pointer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as ie,b as oe}from"./chunk-UEPQYAWE.js";import{a as ee,b as te}from"./chunk-OC2FBL33.js";import{ia as Z}from"./chunk-LZCEM2PC.js";import{
|
|
1
|
+
import{a as ie,b as oe}from"./chunk-UEPQYAWE.js";import{a as ee,b as te}from"./chunk-OC2FBL33.js";import{ia as Z}from"./chunk-LZCEM2PC.js";import{e as Q}from"./chunk-JXSBFTQM.js";import{b as g,c as r}from"./chunk-PW42BQIY.js";import{A as K,a as H,h as J,m as $}from"./chunk-6QYD6NIJ.js";import{r as X,s as Y}from"./chunk-IHNN4Q2N.js";import{i as R,j as U,n as q}from"./chunk-M2FCTYGU.js";import{$c as G,Fc as L,Gb as A,Gc as x,Ic as V,Ka as F,Kc as D,Lc as P,Mb as m,Mc as z,Qc as W,Ra as b,Yb as u,Z as S,aa as p,ad as j,cd as B,dc as M,ea as s,g as c,ia as k,ic as y,ja as I,jc as _,nc as w,oc as O,pa as f,q as l,rb as T,tc as E,uc as n,xa as N,ya as C,za as h}from"./chunk-B7KTCPKC.js";var ae=(()=>{class o{constructor(){this.httpService=f(Q),this.shopeeCategories=new c({data:[],isFirstLoad:!1}),this.tiktokCategories=new c({data:[],isFirstLoad:!1}),this.lazadaCategories=new c({data:[],isFirstLoad:!1}),this.tokopediaCategories=new c({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new c({data:[],isFirstLoad:!1})}getCategories(e,i){switch(e){case g.Shopee:return this.shopeeCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getShopeeCategories(i)));case g.Tiktok:return this.tiktokCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getTiktokCategories(i)));case g.Lazada:return this.lazadaCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getLazadaCategories(i)));case g.Tokopedia:return this.tokopediaCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getTokopediaCategories(i)));case g.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(p(t=>t.isFirstLoad?l(t.data):this.getWooCommerceCategories(i)));default:return l([])}}getShopeeCategories(e){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.shopeeCategories.next(a)}))}getTiktokCategories(e){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.tiktokCategories.next(a)}))}getLazadaCategories(e){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.lazadaCategories.next(a)}))}getTokopediaCategories(e){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.tokopediaCategories.next(a)}))}getWooCommerceCategories(e){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:e}]).pipe(s(t=>{let a={data:t,isFirstLoad:!0};this.wooCommerceCategories.next(a)}))}searchByIdWithParentDFS(e,i){let t=[...e];for(;t.length>0;){let a=t.pop();if(a.id===JSON.stringify(i))return a;if(a.children&&a.children.length>0)for(let v of a.children)v.parent=a,t.push(v)}return null}searchSelectAbleNode(e){let i=null;if(e.selectable)return e;let t=e.children?e.children:[];if(t.length==0)return e;for(let a of t){if(a.children.length==0&&a.selectable)return a;if(i=this.searchSelectAbleNode(a),i)return i}return i}generateCategoryLabel(e){let i="";return e?i=r.getLabelPathTree(e):i="Select a Category",i}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275prov=I({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();function ne(o,d){o&1&&w(0)}function se(o,d){if(o&1&&(y(0,"p-floatLabel",1),m(1,ne,1,0,"ng-container",2),y(2,"label",3),x(3,"Category"),_()()),o&2){n();let e=L(3);T(),u("ngTemplateOutlet",e)}}function le(o,d){o&1&&w(0)}function ce(o,d){if(o&1&&m(0,le,1,0,"ng-container",2),o&2){n();let e=L(3);u("ngTemplateOutlet",e)}}function pe(o,d){if(o&1&&(y(0,"div",6),x(1),_()),o&2){let e=n(2);u("matTooltip",e.selectedCategoryLabel()),T(),V(" ",e.selectedCategoryLabel()," ")}}function ge(o,d){if(o&1){let e=O();y(0,"p-treeSelect",4),G(1,"async"),z("ngModelChange",function(t){C(e);let a=n();return P(a.selectedNode,t)||(a.selectedNode=t),h(t)}),E("click",function(){C(e);let t=n();return h(t.onClickSelect())})("onNodeSelect",function(t){C(e);let a=n();return h(a.onNodeSelect(t))})("onClear",function(){C(e);let t=n();return h(t.onNodeUnselect())}),m(2,pe,2,2,"ng-template",5),_()}if(o&2){let e=n();D("ngModel",e.selectedNode),u("filter",!0)("options",j(1,5,e.categories$))("showClear",e.showClear)("disabled",e.disabled)}}var Pe=(()=>{class o{constructor(){this.categoryService=f(ae),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new F,this.selectedCategoryLabel=b("Select a Category"),this.selectedNode=b(null),this.onChange=e=>{},this.onTouched=()=>{}}ngOnChanges(e){let i=e?.categoryId?.previousValue,t=e?.categoryId?.currentValue;r.IsEmpty(i)&&r.IsNotEmpty(t)&&this.initCategories(),r.IsEmpty(t)&&r.IsNotEmpty(i)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(s(e=>this.setDefaultCategory(e)),S(1))}setDefaultCategory(e){try{let i=this.categoryService.searchByIdWithParentDFS(e,this.categoryId);i&&(this.generateCategoryLabel(i),this.selectedNode.set(i))}catch(i){console.error(i)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(S(1)))}onNodeSelect(e){let i=this.categoryService.searchSelectAbleNode(e.node);this.selectedCategoryLabel.set(r.getLabelPathTree(i));let t=parseInt(i.id);this.onChange(t),this.selectedCategory.emit(t)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(e){e?this.selectedCategoryLabel.set(r.getLabelPathTree(e)):this.selectedCategoryLabel.set("Select a Category")}writeValue(e){r.IsNotEmpty(e)&&(this.categoryId=e,this.initCategories())}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled=e}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275cmp=A({type:o,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},features:[W([{provide:H,useExisting:k(()=>o),multi:!0}]),N],decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory","inputId","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(i,t){i&1&&m(0,se,4,1,"p-floatLabel",1)(1,ce,1,1,"ng-container")(2,ge,3,7,"ng-template",null,0,B),i&2&&M(t.showLabel?0:1)},dependencies:[q,R,U,te,ee,Z,Y,X,K,J,$,oe,ie],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})}}return o})();export{ae as a,Pe as b};
|