marketplacepos 2.8.7 → 2.8.9

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.
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkpos_marketplace=self.webpackChunkpos_marketplace||[]).push([[512],{5512:(J,u,s)=>{s.r(u),s.d(u,{LogisticModule:()=>c});var g=s(6895),f=s(284),_=s(1889),L=s(4782),t=s(4650),v=s(1318),Z=s(7185),p=s(4006),C=s(7481),m=s(8796),d=s(1948),T=s(266);function S(n,i){if(1&n&&(t.TgZ(0,"span",17),t._UZ(1,"img",18),t.qZA(),t._uU(2)),2&n){const e=i.item,o=t.oxw();t.xp6(1),t.Q6J("src",o.getChannelLogo(e.TypeID),t.LSH),t.xp6(1),t.hij(" ",e.Name," ")}}function M(n,i){if(1&n){const e=t.EpF();t.ynx(0),t.TgZ(1,"input",21),t.NdJ("ngModelChange",function(l){t.CHM(e);const h=t.oxw().$implicit;return t.KtG(h.ProductSKU=l)}),t.qZA(),t.BQk()}if(2&n){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("ngModel",e.ProductSKU)}}function y(n,i){if(1&n&&(t.TgZ(0,"ng-option",24),t._uU(1),t.qZA()),2&n){const e=i.$implicit;t.Q6J("value",e.Code),t.xp6(1),t.Oqu(e.Name)}}function A(n,i){if(1&n){const e=t.EpF();t.TgZ(0,"ng-select",22),t.NdJ("ngModelChange",function(l){t.CHM(e);const h=t.oxw().$implicit;return t.KtG(h.ProductSKU=l)}),t.YNc(1,y,2,2,"ng-option",23),t.ALo(2,"async"),t.qZA()}if(2&n){const e=t.oxw().$implicit,o=t.oxw();t.Q6J("ngModel",e.ProductSKU),t.xp6(1),t.Q6J("ngForOf",t.lcZ(2,2,o.logisticOptions$))}}function N(n,i){if(1&n&&(t.TgZ(0,"tr")(1,"td"),t._uU(2),t.qZA(),t.TgZ(3,"td"),t._uU(4),t.qZA(),t.TgZ(5,"td"),t._uU(6),t.qZA(),t.TgZ(7,"td"),t.YNc(8,M,2,1,"ng-container",19),t.YNc(9,A,3,4,"ng-template",null,20,t.W1O),t.qZA()()),2&n){const e=i.$implicit,o=t.MAs(10),l=t.oxw();t.xp6(2),t.Oqu(e.Name),t.xp6(2),t.Oqu(e.Service),t.xp6(2),t.Oqu(e.TypeString),t.xp6(2),t.Q6J("ngIf",!l.logisticServiceType)("ngIfElse",o)}}class r{constructor(i,e){this.http=i,this.toastr=e,this.filter={ChannelID:""},this.logisticServiceType=!0,this.LoaderChannel()}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe((0,L.d)(1))}Validate(){for(let i of this.list)void 0===this.dataold.find(o=>o.ProductSKU==i.ProductSKU&&o.Name==i.Name)&&(i.IsChange=!0);return Promise.resolve(this.list)}submitLogistics(){this.Validate().then(i=>{this.mappingLogisticType(),this.http.post("/api/Logistic/Submit",this.list).subscribe(e=>{this.toastr.success("Success","Update Complete!",{timeOut:5e3,enableHtml:!0}),this.Get()})})}mappingLogisticType(){this.list=this.list.map(i=>(i.Type=this.logisticServiceType,i))}LoaderChannel(){this.http.post("/api/Logistic/Load",{}).subscribe(i=>{this.Channel=i.Options.Channel,this.filter=i.Filter,this.Name=this.Channel[0].Name,this.initLogisticServiceOptions(),this.Get()})}Get(){this.dataold=[],this.http.post("/api/Logistic/Get",this.filter).subscribe(i=>{let e=this.Channel.find(o=>o.ID==this.filter.ChannelID);null!=e&&(this.Name=e.Name),this.list=i,this.dataold=JSON.parse(JSON.stringify(this.list))})}getChannelLogo(i){return _.g.getChannelLogoByTypeId(i)}}r.\u0275fac=function(i){return new(i||r)(t.Y36(v.O),t.Y36(Z._W))},r.\u0275cmp=t.Xpm({type:r,selectors:[["app-logistic"]],decls:37,vars:9,consts:[["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"headerTitle","hideSearchDropdown","onSubmit"],["container",""],[1,"mb-3","fw-normal"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"clearable","items","ngModel","ngModelChange"],["ng-option-tmp",""],[3,"ngModel","ngModelChange"],["matTooltip","Select logistics service option from POS",1,"me-5",3,"value"],["matTooltip","Input Product SKU",3,"value"],["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"],[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"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],["LOGISTIC_NAME",""],["type","text","placeholder","Product SKU",1,"form-control","w-75",3,"ngModel","ngModelChange"],["placeholder","Logistic Service Code",1,"w-75",3,"ngModel","ngModelChange"],[3,"value",4,"ngFor","ngForOf"],[3,"value"]],template:function(i,e){1&i&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return e.Get()}),t.TgZ(1,"filters")(2,"div",1)(3,"div")(4,"h5",2),t._uU(5,"Select a Channel"),t.qZA(),t.TgZ(6,"ng-select",3),t.NdJ("ngModelChange",function(l){return e.filter.ChannelID=l}),t.YNc(7,S,3,2,"ng-template",4),t.qZA()(),t.TgZ(8,"div")(9,"h5",2),t._uU(10,"Type"),t.qZA(),t.TgZ(11,"mat-radio-group",5),t.NdJ("ngModelChange",function(l){return e.logisticServiceType=l}),t.TgZ(12,"mat-radio-button",6),t._uU(13," Logistics "),t.qZA(),t.TgZ(14,"mat-radio-button",7),t._uU(15," SKU "),t.qZA()()()()(),t.TgZ(16,"actions")(17,"a",8),t.NdJ("click",function(){return e.submitLogistics()}),t._uU(18,"Submit"),t.qZA()(),t.TgZ(19,"content")(20,"div",9)(21,"div",10)(22,"div",11)(23,"div",12)(24,"table",13)(25,"thead",14)(26,"tr",15)(27,"th"),t._uU(28,"Logistic"),t.qZA(),t.TgZ(29,"th"),t._uU(30,"Service"),t.qZA(),t.TgZ(31,"th"),t._uU(32,"Type"),t.qZA(),t.TgZ(33,"th"),t._uU(34,"Logistic Service"),t.qZA()()(),t.TgZ(35,"tbody"),t.YNc(36,N,11,5,"tr",16),t.qZA()()()()()()()()),2&i&&(t.Q6J("headerTitle","Logistic Courier - "+e.Name)("hideSearchDropdown",!1),t.xp6(6),t.Q6J("clearable",!0)("items",e.Channel)("ngModel",e.filter.ChannelID),t.xp6(5),t.Q6J("ngModel",e.logisticServiceType),t.xp6(1),t.Q6J("value",!0),t.xp6(2),t.Q6J("value",!1),t.xp6(22),t.Q6J("ngForOf",e.list))},dependencies:[g.sg,g.O5,p.Fj,p.JJ,p.On,C.p,m.w9,m.jq,m.ir,d.VQ,d.U0,T.gM,g.Ov]});const U=[{path:"",component:r}];class a{}a.\u0275fac=function(i){return new(i||a)},a.\u0275mod=t.oAB({type:a}),a.\u0275inj=t.cJS({imports:[g.ez,f.Bz.forChild(U)]});var x=s(455);class c{}c.\u0275fac=function(i){return new(i||c)},c.\u0275mod=t.oAB({type:c}),c.\u0275inj=t.cJS({imports:[g.ez,f.Bz,a,p.u5,C.R,m.A0,x.rP,d.Fk,T.AV]})}}]);