1"use strict";(self.webpackChunkfrontend=self.webpackChunkfrontend||[]).push([[282],{60282:(Lt,G,a)=>{a.r(G),a.d(G,{OrderModule:()=>wt});var h=a(36895),x=a(41218),z=a(52781),m=a(9116),U=a(70655),t=a(94650),u=a(26118),H=a(80473),T=a(49933),w=a(89383),O=a(74072),b=a(34527),M=a(58667),ot=a(80400),X=a(50494),L=a(15439),Z=a(66616),A=a(59355),v=a(50007),d=a(40269),S=a(6672),E=a(37570),g=a(61135),P=a(39841),I=a(18505),N=a(63900),p=a(70262),c=a(24006),j=a(95328),F=a(76053),f=a(79699),it=a(33498),q=a(78372),B=a(71884),W=a(28746),Y=a(54004),at=a(53376),st=a(72428),R=a(64306),lt=a(22373);let y=(()=>{class o{constructor(e,r,i,s,l){this.fb=e,this.courseCommonService=r,this.planCommonService=i,this.examPackCommonService=s,this.orderItemCommonService=l,this.searchExamPack$=new g.X(""),this.searchReference$=new g.X(""),this.subscriptionReferenceType$=new g.X(F.z.EXAM_PACK),this.referenceLoading$=new g.X(!1),this.searchPlan$=new g.X(""),this.searchOrderItem$=new g.X("")}searchForm(){return this.fb.group({date:new c.NI(null),status:new c.NI(""),keyword:new c.NI("")})}searchTemplate(){return{date:{component:it.R,option:{nzSize:"large",type:"text",placeholder:["T\u1eeb ng\xe0y","\u0110\u1ebfn ng\xe0y"],className:["col-12","col-lg-5"]}},status:{component:f.Zs,option:{nzSize:"large",type:"text",placeholder:"Tr\u1ea1ng th\xe1i",className:["col-12","col-lg-3"],nzOptions:[{label:"\u0110\xe3 thanh to\xe1n",value:u.iF.PAID},{label:"Ch\u1edd x\xe1c nh\u1eadn",value:u.iF.WAITING},{label:"Ch\u01b0a thanh to\xe1n",value:u.iF.UNPAID},{label:"\u0110\u01a1n ha\u0300ng b\u1ecb h\u1ee7y",value:u.iF.CANCELLED}]}},keyword:{component:f.RB,option:{placeholder:"M\xe3 \u0111\u01a1n h\xe0ng, t\xean , email, S\u0110T",nzSize:"large",className:["col-12","col-lg-4"]}}}}updateOrderStatusForm(){return this.fb.group({status:new c.NI("",[c.kI.required])})}updateOrderStatusTemplate(){return{status:{component:f.Zs,option:{nzSize:"large",type:"text",label:"Tr\u1ea1ng th\xe1i",className:["col-12"],nzOptions:[{label:"\u0110\xe3 thanh to\xe1n",value:u.iF.PAID},{label:"Ch\u1edd x\xe1c nh\u1eadn",value:u.iF.WAITING},{label:"Ch\u01b0a thanh to\xe1n",value:u.iF.UNPAID},{label:"\u0110\u01a1n ha\u0300ng b\u1ecb h\u1ee7y",value:u.iF.CANCELLED}]}}}}updateOrderNoteForm(){return this.fb.group({note:new c.NI("",[c.kI.required])})}updateOrderNoteTemplate(){return{note:{component:f.D9,option:{nzSize:"large",type:"text",label:"Ghi chu\u0301",className:["col-12"]}}}}setSubscriptionReferenceType(e){this.referenceLoading$.next(!0),this.searchReference$.next(""),this.subscriptionReferenceType$.next(e)}getReferenceLoadingState(){return this.referenceLoading$}referenceSubscriptionForm(){return this.fb.group({referenceType:new c.NI(F.z.EXAM_PACK,[c.kI.required]),reference:new c.NI(null,[c.kI.required]),planId:new c.NI("",[c.kI.required])})}referenceSubscriptionTemplate(){return{referenceType:{component:f.Zs,option:{nzSize:"large",type:"text",label:"Lo\u1ea1i d\u1ecbch v\u1ee5",className:["col-12"],nzOptions:[{label:"B\u1ed9 c\xe2u h\u1ecfi",value:F.z.EXAM_PACK},{label:"Kh\xf3a h\u1ecdc",value:F.z.COURSE}]}},reference:{component:f.tr,option:{nzSize:"large",type:"text",label:"D\u1ecbch v\u1ee5",showSearch:!0,allowClear:!0,className:["col-12"],onSearch:e=>this.searchReference$.next(e),nzOptions:(0,P.a)([this.searchReference$.pipe((0,q.b)(500),(0,B.x)()),this.subscriptionReferenceType$]).pipe((0,N.w)(([e,r])=>r===F.z.COURSE?this.courseCommonService.get({keyword:e??""}).pipe((0,W.x)(()=>this.referenceLoading$.next(!1))):this.examPackCommonService.get({keyword:e??""}).pipe((0,W.x)(()=>this.referenceLoading$.next(!1)))),(0,Y.U)(e=>e.data.map(r=>({label:r.name,value:r}))))}},planId:{component:f.tr,option:{nzSize:"large",type:"text",label:"Ch\u01b0\u01a1ng tr\xecnh \u01b0u \u0111\xe3i",showSearch:!0,allowClear:!0,className:["col-12"],onSearch:e=>this.searchPlan$.next(e),nzOptions:this.searchPlan$.pipe((0,q.b)(500),(0,B.x)(),(0,N.w)(e=>this.planCommonService.get({keyword:e??""})),(0,Y.U)(e=>e.data.map(r=>({label:r.name,value:r.id}))))}}}}addOrderItemToOrderForm(){return this.fb.group({orderItemId:new c.NI("",[c.kI.required])})}addOrderItemToOrderTemplate(e){return{orderItemId:{component:f.tr,option:{nzSize:"large",type:"text",label:"D\u1ecbch v\u1ee5",showSearch:!0,allowClear:!0,className:["col
1-12"],onSearch:r=>this.searchOrderItem$.next(r),nzOptions:this.searchOrderItem$.pipe((0,q.b)(500),(0,B.x)(),(0,N.w)(r=>this.orderItemCommonService.get({keyword:r??"",userId:e})),(0,Y.U)(r=>r.data.map(i=>({label:`${i.type===u.yh.REGISTER?"\u0110\u0103ng k\xfd":"Gia h\u1ea1n"} ${i.subscription?.examPack?.name} ${i?.plan?.name}`,value:i.id}))))}}}}updateOrderBillForm(){return this.fb.group({billImage:new c.NI(null,[c.kI.required])})}updateOrderBillTemplate(){return{billImage:{component:f.Vh,option:{nzSize:"large",nzMultiple:!1,queryParamKey:"files",apiEndPoint:`${j.N.apiUrl}/file/upload`,reponseHandler:e=>e.data[0].url,className:["col-12","p-1"]}}}}}return o.\u0275fac=function(e){return new(e||o)(t.LFG(c.qu),t.LFG(at.l),t.LFG(lt.H),t.LFG(st.X),t.LFG(R.o))},o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var tt=a(80529);let $=(()=>{class o extends u.bQ{constructor(){super(...arguments),this.url="/order"}export(e){const r=new tt.LE({fromObject:e}),i=new tt.WM({Accept:"application/application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"});return this.http.get(`${j.N.apiUrl}${this.url}/export`,{params:r,headers:i,observe:"response",responseType:"blob"})}createSubscription(e,r){return this.http.post(this.getApiUrl(`${this.url}/${e}/subscription`),r).pipe((0,p.K)(i=>{throw i}))}markAsCompleted(e){return this.http.put(this.getApiUrl(`${this.url}/${e}/mark-as-completed`),{}).pipe((0,p.K)(r=>{throw r}))}updateOrderStatus(e,r){return this.http.put(this.getApiUrl(`${this.url}/${e}/status`),r).pipe((0,p.K)(i=>{throw i}))}updateOrderNote(e,r){return this.http.put(this.getApiUrl(`${this.url}/${e}/note`),r).pipe((0,p.K)(i=>{throw i}))}addOrderItemToOrder(e,r){return this.http.post(this.getApiUrl(`${this.url}/${e}/order-item`),r).pipe((0,p.K)(i=>{throw i}))}updateOrderBill(e,r){return this.http.put(this.getApiUrl(`/order/${e}/bill`),{billImage:r})}}return o.\u0275fac=function(){let n;return function(r){return(n||(n=t.n5z(o)))(r||o)}}(),o.\u0275prov=t.Yz7({token:o,factory:o.\u0275fac,providedIn:"root"}),o})();var et=a(47044),nt=a(21811);const ct=["searchFormInputs"];function ut(o,n){if(1&o&&(t.TgZ(0,"p"),t._UZ(1,"small",35),t.qZA()),2&o){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("innerHTML",e.note,t.oJD)}}function dt(o,n){if(1&o&&(t.TgZ(0,"p")(1,"span"),t._uU(2,"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i: "),t.qZA(),t.TgZ(3,"strong"),t._uU(4),t.qZA()()),2&o){const e=t.oxw().$implicit;t.xp6(4),t.Oqu(e.phoneNumber||(null==e||null==e.user?null:e.user.phoneNumber))}}function pt(o,n){if(1&o&&(t.TgZ(0,"p")(1,"span"),t._uU(2,"Gi\u1ea3m gi\xe1: "),t.qZA(),t.TgZ(3,"strong"),t._uU(4),t.ALo(5,"currency"),t.qZA()()),2&o){const e=t.oxw().$implicit;t.xp6(4),t.Oqu(t.Dn7(5,1,e.discount,"VND","VN\u0110"))}}function mt(o,n){if(1&o&&(t.TgZ(0,"p")(1,"span"),t._uU(2,"Ng\xe0y mua h\xe0ng: "),t.qZA(),t.TgZ(3,"strong"),t._uU(4),t.ALo(5,"date"),t.qZA()()),2&o){const e=t.oxw().$implicit;t.xp6(4),t.Oqu(t.xi3(5,1,e.purchaseDate,"dd/MM/yyyy HH:mm"))}}function ht(o,n){if(1&o&&(t.TgZ(0,"p")(1,"small",36),t._uU(2," \u0110\xe3 \u0111\u01b0\u1ee3c x\xe1c nh\u1eadn b\u1edfi "),t.TgZ(3,"strong"),t._uU(4),t.qZA()()()),2&o){const e=t.oxw().$implicit;t.xp6(4),t.Oqu(e.verifiedBy)}}function gt(o,n){if(1&o&&(t.TgZ(0,"div",37),t._UZ(1,"img",38),t.qZA()),2&o){const e=t.oxw().$implicit;t.xp6(1),t.Q6J("nzSrc",e.billImage)}}function ft(o,n){1&o&&(t.TgZ(0,"nz-tag",39),t._uU(1," \u0110\xe3 thanh to\xe1n "),t.qZA())}function vt(o,n){1&o&&(t.TgZ(0,"nz-tag",40),t._uU(1," Ch\u1edd x\xe1c nh\u1eadn "),t.qZA())}function xt(o,n){1&o&&(t.TgZ(0,"nz-tag",41),t._uU(1," Ch\u01b0a thanh to\xe1n "),t.qZA())}function zt(o,n){1&o&&(t.TgZ(0,"nz-tag",42),t._uU(1," B\u1ecb h\u1ee7y "),t.qZA())}const bt=function(o){return[o,"detail"]};function Ct(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"tr")(1,"td"),t._uU(2),t.YNc(3,ut,2,1,"p",20),t.qZA(),t.TgZ(4,"td")(5,"div")(6,"p")(7,"span"),t._uU(8,"Ng\u01b0\u1eddi mua: "),t.qZA(),t.TgZ(9,"strong"),t._uU(10),t.qZA()(),t.TgZ(11,"p")(12,"span"),t._uU(13,"Email: "),t.qZA(),t.TgZ(14,"strong"),t._uU(15),t.qZA()(),t.YNc(16,dt,5,1,"p",20),t.qZA()(),t.TgZ(17,"td",21)(18,"p")(19,"span"),t._uU(20,"T\u1ed5ng ti\u1ec1n: "),t.qZA(),t.TgZ(21,"strong"),t._uU(22),t.ALo(23,"currency"),t.qZA()(),t.YNc(24,pt,6,5,"p",20),t.TgZ(25,"p")(26,"span"),t._uU(27,"S\u1ed1 ti\u1ec1n thanh to\xe1n: "),t.qZA(),t.TgZ(28,"strong"),t._uU(29),t.ALo(30,"currency"),t.qZA()(),t.YNc(31,mt,6,4,"p",20),t.YNc(32,ht,5,1,"p",20),t.qZA(),t.TgZ(33,"td",21),t.YNc(34,gt,2,1,"div",22),t.qZA(),t.TgZ(35,"td",21),t.YNc(36,ft,2,0,"nz-tag",23),t.YNc(37,vt,2,0,"nz-tag",24),t.YNc(38,xt,2,0,"nz-tag",25),t.YNc(39,zt,2,0,"nz-tag",26),t.qZA(),t.TgZ(40,"td")(41,"div",11)(42,"button",27),t._UZ(43,"i",28),t._uU(44," Chi ti\u1ebft "),t.qZA(),t.TgZ(45,"button",29),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.openUpdateStatusModal(s))}),t._UZ(46,"i",30),t._uU(47," C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i "),t.qZA(),t.TgZ(48,"button",29),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.openUpdateBillImageModal(s))}),t._UZ(49,"i",31),t._uU(50," C\u1eadp nh\u1eadt \u1ea3nh bill "),t.qZA(),t.TgZ(51,"button",29),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.markAsCompleted(s))}),t._UZ(52,"i",32),t._uU(53," \u0110\xe1nh d\u1ea5u \u0111\xe3 thanh to\xe1n "),t.qZA(),t.TgZ(54,"button",29),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.openUpdateNoteModal(s))}),t._UZ(55,"i",33),t._uU(56," Th\xeam ghi ch\xfa "),t.qZA(),t.TgZ(57,"button",29),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw();return t.KtG(l.deleteItem(s))}),t._UZ(58,"i",34),t._uU(59," X\xf3a "),t.qZA()()()()}if(2&o){const e=n.$implicit,r=t.oxw();
1t.xp6(2),t.hij(" ",e.orderNumber," "),t.xp6(1),t.Q6J("ngIf",e.note),t.xp6(7),t.Oqu(e.fullName||(null==e||null==e.user?null:e.user.getFullName())),t.xp6(5),t.Oqu(null==e||null==e.user?null:e.user.email),t.xp6(1),t.Q6J("ngIf",e.phoneNumber||(null==e||null==e.user?null:e.user.phoneNumber)),t.xp6(6),t.Oqu(t.Dn7(23,16,e.totalPrice,"VND","VN\u0110")),t.xp6(2),t.Q6J("ngIf",e.discount),t.xp6(5),t.Oqu(t.Dn7(30,20,r.getOrderFinalTotal(e),"VND","VN\u0110")),t.xp6(2),t.Q6J("ngIf",e.purchaseDate),t.xp6(1),t.Q6J("ngIf",e.verifiedBy),t.xp6(2),t.Q6J("ngIf",e.billImage),t.xp6(2),t.Q6J("ngIf",e.status===r.orderStatus.PAID),t.xp6(1),t.Q6J("ngIf",e.status===r.orderStatus.WAITING),t.xp6(1),t.Q6J("ngIf",e.status===r.orderStatus.UNPAID),t.xp6(1),t.Q6J("ngIf",e.status===r.orderStatus.CANCELLED),t.xp6(3),t.Q6J("routerLink",t.VKq(24,bt,e.id))}}let C=class{constructor(n,e,r,i,s,l,D,Q,V){this.router=n,this.modal=e,this.orderService=r,this.translate=i,this.activatedRoute=s,this.ngxFormManager=l,this.viewContainerRef=D,this.orderNgxFormService=Q,this.notificationService=V,this.isExporting$=new g.X(!1),this.items=[],this.fetchData$=new g.X(null),this.isLoading=!0,this.orderStatus=u.iF,this.searchForm=this.orderNgxFormService.searchForm(),this.searchTemplate=this.orderNgxFormService.searchTemplate(),this.updateOrderStatusForm=this.orderNgxFormService.updateOrderStatusForm(),this.updateOrderStatusTemplate=this.orderNgxFormService.updateOrderStatusTemplate(),this.updateOrderNoteForm=this.orderNgxFormService.updateOrderNoteForm(),this.updateOrderNoteTemplate=this.orderNgxFormService.updateOrderNoteTemplate(),this.updateOrderBillForm=this.orderNgxFormService.updateOrderBillForm(
1),this.updateOrderBillTemplate=this.orderNgxFormService.updateOrderBillTemplate()}ngOnInit(){(0,P.a)({queryParams:this.activatedRoute.queryParams,fetchData:this.fetchData$}).pipe((0,T.t)(this),(0,I.b)(({queryParams:e})=>{const r=e.keyword??null,i=e.status??null,s=e.fromDate?L(e.fromDate,"YYYY-MM-DD").toDate():null,l=e.toDate?L(e.toDate,"YYYY-MM-DD").toDate():null;this.searchForm.patchValue({keyword:r,status:i,date:s&&l?[s,l]:null}),this.isLoading=!0}),(0,N.w)(({queryParams:e})=>this.orderService.get(e))).subscribe(e=>{this.isLoading=!1,this.items=(0,X.yE)(H.K,e.data),this.pagination=e.meta.pagination});const n=this.ngxFormManager.init(this.searchForm,this.searchTemplate);this.searchFormInputs.viewContainerRef.clear(),this.ngxFormManager.render(n,this.searchFormInputs.viewContainerRef)}exportExcel(){const n=this.router.parseUrl(this.router.url).queryParams;this.isExporting$.next(!0),this.orderService.export(n).pipe((0,p.K)(e=>{throw this.isExporting$.next(!1),e})).subscribe(e=>{if(e.body){const r=new Blob([e.body],{type:"application/application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),i=URL.createObjectURL(r),s=document.createElement("a");s.href=i,s.download="DS_cau_hoi.xlsx",s.click(),this.isExporting$.next(!1)}})}search(){const n=this.searchForm.get("date")?.value||[],e=n.length>0&&n[0]?L(n[0]).format("YYYY-MM-DD"):null,r=n.length>0&&n[1]?L(n[1]).format("YYYY-MM-DD"):null,i=this.searchForm.get("keyword")?.value,s=this.searchForm.get("status")?.value;this.router.navigate([],{relativeTo:this.activatedRoute,queryParams:{status:s??null,keyword:i??null,toDate:e,fromDate:r,page:1},queryParamsHandling:"merge"})}getOrderFinalTotal(n){return Math.max((n.totalPrice||0)-(n.discount||0),0)}markAsCompleted(n){const e=this.modal.warning({nzTitle:"\u0110\xe1nh d\u1ea5u \u0111\u01a1n h\xe0ng \u0111\xe3 thanh to\xe1n",nzContent:`B\u1ea1n mu\u1ed1n \u0111\xe1nh d\u1ea5u \u0111\u01a1n h\xe0ng <b>${n.orderNumber}</b> \u0111\xe3 \u0111\u01b0\u1ee3c thanh to\xe1n`,nzOnOk:()=>{e.updateConfig({nzOkLoading:!0}),this.orderService.markAsCompleted(n.id).pipe((0,I.b)(()=>e.updateConfig({nzOkLoading:!1})),(0,p.K)(r=>{throw e.updateConfig({nzOkLoading:!1}),r})).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),"X\xe1c nh\u1eadn thanh to\xe1n th\xe0nh c\xf4ng",{nzDuration:3e3}),this.fetchData$.next(null),e.destroy()})}})}openUpdateStatusModal(n){this.updateOrderStatusForm.setValue({status:n.status});const e=this.modal.create({nzTitle:"C\u1eadp nh\u1eadt tr\u1ea1ng th\xe1i",nzContent:b.K,nzWidth:"60vw",nzComponentParams:{form:this.updateOrderStatusForm,template:this.updateOrderStatusTemplate},nzViewContainerRef:this.viewContainerRef,nzOnOk:()=>{const r=e.getContentComponent().form;
1if(r.invalid)this.ngxFormManager.markAllAsDirty(r);else{e.updateConfig({nzOkLoading:!0});const i={status:r.get("status")?.value};this.orderService.updateOrderStatus(n.id,i).pipe((0,p.K)(s=>{throw e.updateConfig({nzOkLoading:!1}),s})).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),this.translate.instant("success.create"),{nzDuration:3e3}),this.fetchData$.next(null),this.updateOrderStatusForm.reset(),e.destroy()})}return!1}})}openUpdateNoteModal(n){this.updateOrderNoteForm.setValue({note:n.note});const e=this.modal.create({nzTitle:"C\u1eadp nh\u1eadt ghi ch\xfa",nzContent:b.K,nzWidth:"60vw",nzComponentParams:{form:this.updateOrderNoteForm,template:this.updateOrderNoteTemplate},nzViewContainerRef:this.viewContainerRef,nzOnOk:()=>{const r=e.getContentComponent().form;if(r.invalid)this.ngxFormManager.markAllAsDirty(r);else{e.updateConfig({nzOkLoading:!0});const i={note:r.get("note")?.value};this.orderService.updateOrderNote(n.id,i).pipe((0,p.K)(s=>{throw e.updateConfig({nzOkLoading:!1}),s})).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),this.translate.instant("success.create"),{nzDuration:3e3}),this.fetchData$.next(null),this.updateOrderNoteForm.reset(),e.destroy()})}return!1}})}openUpdateBillImageModal(n){n.billImage&&this.updateOrderBillForm.setValue({billImage:[{uid:"1",name:n.billImage,status:"done",url:n.billImage}]});const e=this.modal.create({nzTitle:"C\u1eadp nh\u1eadt \u1ea3nh bill",nzContent:b.K,nzWidth:"60vw",nzComponentParams:{form:this.updateOrderBillForm,template:this.updateOrderBillTemplate},nzViewContainerRef:this.viewContainerRef,nzOnOk:()=>{const r=e.getContentComponent().form;
1if(r.invalid)this.ngxFormManager.markAllAsDirty(r);else{e.updateConfig({nzOkLoading:!0});const i=r.get("billImage")?.value[0]?.url??null;this.orderService.updateOrderBill(n.id,i).pipe((0,p.K)(s=>{throw e.updateConfig({nzOkLoading:!1}),s})).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),this.translate.instant("success.create"),{nzDuration:3e3}),this.fetchData$.next(null),this.updateOrderBillForm.reset(),e.destroy()})}return!1}})}deleteItem(n){const e=this.modal.warning({nzTitle:"Xo\xe1",nzContent:`B\u1ea1n \u0111ang x\xf3a \u0111\u01a1n h\xe0ng <b>${n.orderNumber}</b>`,nzCancelText:this.translate.instant("common.cancel"),nzOnOk:()=>{e.updateConfig({nzOkLoading:!0}),this.orderService.delete(n.id).pipe((0,I.b)(()=>e.updateConfig({nzOkLoading:!1})),(0,p.K)(r=>{throw e.updateConfig({nzOkLoading:!1}),r})).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),this.translate.instant("success.delete"),{nzDuration:3e3}),this.fetchData$.next(null),e.destroy()})}})}};C.\u0275fac=function(n){return new(n||C)(t.Y36(m.F0),t.Y36(v.Sf),t.Y36($),t.Y36(w.sK),t.Y36(m.gz),t.Y36(O.hV),t.Y36(t.s_b),t.Y36(y),t.Y36(M.g))},C.\u0275cmp=t.Xpm({type:C,selectors:[["app-list"]],viewQuery:function(n,e){if(1&n&&t.Gf(ct,7),2&n){let r;t.iGM(r=t.CRH())&&(e.searchFormInputs=r.first)}},standalone:!0,features:[t._Bn([y]),t.jDz],decls:39,vars:7,consts:[[1,"component"],[1,"row"],[1,"col"],[1,"title"],[1,"sub-nav","d-flex","justify-content-between","mb-3"],[1,"search","d-flex"],[1,"search__input"],["searchFormInputs",""],[1,"search__btn"],["nz-button","","nzType","primary","nzSize","large",1,"btn-success",3,"click"],["nz-icon","","nzType","search","nzTheme","outline"],[1,"action"],["nz-button","","nzType","primary","nzSize","large",1,"btn-export","mb-3",3,"nzLoading","click"],["nz-icon","","nzType","export","nzTheme","outline"],[1,"col","mb-4"],["nzFrontPagination","false",3,"nzData","nzLoading"],[1,"fw-bold"],[1,"fw-bold","d-none","d-md-table-cell"],[4,"ngFor","ngForOf"],[3,"pagination"],[4,"ngIf"],[1,"d-none","d-md-table-cell"],["class","ratio ratio-1x1",4,"ngIf"],["nzColor","green","nzMode","default",4,"ngIf"],["nzColor","blue","nzMode","default",4,"ngIf"],["nzColor","orange","nzMode","default",4,"ngIf"],["nzColor","red","nzMode","default",4,"ngIf"],["nz-button","","nzType","dashed","nzSize","small",1,"me-1","mb-1",3,"routerLink"],["nz-icon","","nzType","info-circle"],["nz-button","","nzType","dashed","nzSize","small",1,"me-1","mb-1","d-none","d-md-block",3,"click"],["nz-icon","","nzType","form"],["nz-icon","","nzType","upload"],["nz-icon","","nzType","check-circle"],["nz-icon","","nzType","plus"],["nz-icon","","nzType","delete",2,"color","#cf002a"],[1,"fw-semibold","fst-italic",3,"innerHTML"],[1,"fst-italic"],[1,"ratio","ratio-1x1"],["nz-image","","alt","Bill",1,"w-100","object-fit-contain",3,"nzSrc"],["nzColor","green","nzMode","default"],["nzColor","blue","nzMode","default"],["nzColor","orange","nzMode","default"],["nzColor","red","nzMode","default"]],template:function(n,e){1&n&&(t.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2",3),t._uU(4,"Danh s\xe1ch \u0111\u01a1n h\xe0ng"),t.qZA()()(),t.TgZ(5,"div",4)(6,"div",5)(7,"div",6)(8,"div",1),t._UZ(9,"ngx-form-anchor",null,7),t.qZA()(),t.TgZ(11,"div",8)(12,"button",9),t.NdJ("click",function(){return e.search()}),t._UZ(13,"i",10),t._uU(14,"T\xecm "),t.qZA()()(),t.TgZ(15,"div",11)(16,"button",12),t.NdJ("click",function(){return e.exportExcel()}),t.ALo(17,"async"),t._UZ(18,"i",13),t._uU(19," Xu\u1ea5t d\u1eef li\u1ec7u "),t.qZA()()(),t.TgZ(20,"div",1)(21,"div",14)(22,"nz-table",15)(23,"thead")(24,"tr")(25,"th",16),t._uU(26,"M\xe3 \u0111\u01a1n h\xe0ng"),t.qZA(),t.TgZ(27,"th",16),t._uU(28,"Th\xf4ng tin ng\u01b0\u1eddi d\xf9ng"),t.qZA(),t.TgZ(29,"th",17),t._uU(30,"Th\xf4ng tin \u0111\u01a1n h\xe0ng"),t.qZA(),t.TgZ(31,"th",17),t._uU(32,"\u1ea2nh bill"),t.qZA(),t.TgZ(33,"th",17),t._uU(34,"Tr\u1ea1ng th\xe1i"),t.qZA(),t._UZ(35,"th"),t.qZA()(),t.TgZ(36,"tbody"),t.YNc(37,Ct,60,26,"tr",18),t.qZA()()(),t._UZ(38,"app-simple-pagination",19),t.qZA()()),2&n&&(t.xp6(16),t.Q6J("nzLoading",t.lcZ(17,5,e.isExporting$)),t.xp6(6),t.Q6J("nzData",e.items)("nzLoading",e.isLoading),t.xp6(15),t.Q6J("ngForOf",e.items),t.xp6(1),t.Q6J("pagination",e.pagination))},dependencies:[h.ez,h.sg,h.O5,h.Ov,h.H9,h.uU,m.Bz,m.rH,O.$Q,O.M6,ot.v,d.HQ,d.N8,d.Uo,d._C,d.Om,d.p0,d.$Z,v.Qp,Z.sL,Z.ix,et.w,nt.dQ,S.X,S.j,E.cg,z.PV,z.Ls,A.Gb,A.Ie],styles:['@font-face{font-family:SegoeUI-Bold;src:url("/assets/fonts/Segoe UI Bold.ttf");font-display:swap}@font-face{font-family:SegoeUI-Italic;
1src:url(/assets/fonts/SegoeUI-Italic.ttf);font-display:swap}@font-face{font-family:SegoeUI-Light;src:url(/assets/fonts/SegoeUI-Light.ttf);font-display:swap}@font-face{font-family:SegoeUI-Medium;src:url(/assets/fonts/SegoeUI-Medium.ttf);font-display:swap}@font-face{font-family:SegoeUI-Regular;src:url(/assets/fonts/SEGOEUI.TTF);font-display:swap}@font-face{font-family:SegoeUI-SemiBold;src:url(/assets/fonts/seguisb.ttf);font-display:swap}@font-face{font-family:SegoeUI-SemiboldItalic;src:url("/assets/fonts/Segoe ui semibold italic.ttf");font-display:swap}@media (max-width: 1399.98px){.sub-nav[_ngcontent-%COMP%]{flex-direction:column-reverse}}.sub-nav[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{justify-content:space-between;width:60%}@media (max-width: 1399.98px){.sub-nav[_ngcontent-%COMP%] .search[_ngcontent-%COMP%]{width:100%;flex-direction:column}}.sub-nav[_ngcontent-%COMP%] .search__btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}@media (max-width: 1399.98px){.sub-nav[_ngcontent-%COMP%] .search__btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0;width:305px}}@media (max-width: 767.98px){.sub-nav[_ngcontent-%COMP%] .search__btn[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}}.sub-nav[_ngcontent-%COMP%] .search__input[_ngcontent-%COMP%]{width:100%;margin-right:10px}.sub-nav[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin-left:10px}@media (max-width: 767.98px){.sub-nav[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}}@media (max-width: 1399.98px){.sub-nav[_ngcontent-%COMP%] .action[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{margin:0 10px 0 0}}']}),C=(0,U.gn)([(0,T.c)(),(0,U.w6)("design:paramtypes",[m.F0,v.Sf,$,w.sK,m.gz,O.hV,t.s_b,y,M.g])],C);var J=a(74383),k=a(94963),K=a(38231),rt=a(27802);function _t(o,n){if(1&o&&(t.TgZ(0,"p")(1,"span"),t._uU(2,"T\xean d\u1ecbch v\u1ee5: "),t.qZA(),t.TgZ(3,"strong"),t._uU(4),t.qZA()()),2&o){const e=t.oxw().$implicit,r=t.oxw(2);t.xp6(4),t.Oqu(r.getSubscriptionName(e))}}function Tt(o,n){if(1&o&&(t.TgZ(0,"span",50),t._uU(1),t.qZA()),2&o){const e=t.oxw().ngIf;t.xp6(1),t.hij(" \u0110\u01b0\u1ee3c t\u1eb7ng th\xeam ",e.bonus," th\xe1ng ")}}function Ot(o,n){if(1&o&&(t.TgZ(0,"p")(1,"span"),t._uU(2,"Th\u1eddi h\u1ea1n: "),t.qZA(),t.TgZ(3,"strong"),t._uU(4),t.qZA(),t.YNc(5,Tt,2,1,"span",49),t.qZA()),2&o){const e=n.ngIf;t.xp6(4),t.hij(" ",e.duration," th\xe1ng "),t.xp6(1),t.Q6J("ngIf",e.bonus)}}function Zt(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"tr")(1,"td"),t._UZ(2,"nz-avatar",42),t.qZA(),t.TgZ(3,"td"),t.YNc(4,_t,5,1,"p",43),t.YNc(5,Ot,6,2,"p",43),t.TgZ(6,"p")(7,"span"),t._uU(8,"T\u1ed5ng ti\u1ec1n: "),t.qZA(),t.TgZ(9,"strong"),t._uU(10),t.ALo(11,"currency"),t.qZA()()(),t.TgZ(12,"td")(13,"div",44)(14,"button",45),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw(2);return t.KtG(l.openEditSubscriptionModal(s))}),t._UZ(15,"i",46),t.qZA(),t.TgZ(16,"button",47),t.NdJ("click",function(){const s=t.CHM(e).$implicit,l=t.oxw(2);return t.KtG(l.removeOrderItemFromOrder(s))}),t._UZ(17,"i",48),t.qZA()()()()}if(2&o){const e=n.$implicit,r=t.oxw(2);t.xp6(2),t.Q6J("nzSize",64)("nzSrc",r.getSubscriptionImage(e)),t.xp6(2),t.Q6J("ngIf",r.getSubscriptionName(e)),t.xp6(1),t.Q6J("ngIf",e.plan),t.xp6(5),t.Oqu(t.xi3(11,5,e.price,"VND"))}}const At=function(o){return[o]};function St(o,n){if(1&o&&(t.TgZ(0,"div",51)(1,"div",52)(2,"h6",13),t._uU(3," Th\xf4ng tin ng\u01b0\u1eddi d\xf9ng "),t.qZA()(),t.TgZ(4,"div")(5,"nz-table",16)(6,"tbody")(7,"tr")(8,"td"),t._uU(9,"T\xean ng\u01b0\u1eddi d\xf9ng"),t.qZA(),t.TgZ(10,"td"),t._uU(11),t.qZA()(),t.TgZ(12,"tr")(13,"td"),t._uU(14,"S\u1ed1 \u0111i\u1ec7n tho\u1ea1i"),t.qZA(),t.TgZ(15,"td"),t._uU(16),t.qZA()(),t.TgZ(17,"tr")(18,"td"),t._uU(19,"Email"),t.qZA(),t.TgZ(20,"td"),t._uU(21),t.qZA()()()()()()),2&o){const e=n.ngIf,r=t.oxw(2);t.xp6(5),t.Q6J("nzData",t.VKq(4,At,e)),t.xp6(6),t.Oqu(r.order.fullName||e.getFullName()),t.xp6(5),t.Oqu(r.order.phoneNumber||e.phoneNumber),t.xp6(5),t.Oqu(e.email)}}function Ft(o,n){if(1&o&&t._UZ(0,"img",53),2&o){const e=t.oxw(2);t.Q6J("nzSrc",e.order.billImage)}}function yt(o,n){if(1&o&&(t.TgZ(0,"div",36)(1,"span"),t._uU(2,"Gi\u1ea3m gi\xe1"),t.qZA(),t.TgZ(3,"span"),t._uU(4),t.ALo(5,"currency"),t.qZA()()),2&o){const e=t.oxw(2);t.xp6(4),t.hij(" ",t.xi3(5,1,e.order.discount,"VND"),"")}}function Et(o,n){if(1&o){const e=t.EpF();t.TgZ(0,"div",4)(1,"div",5)(2,"h2",6),t._uU(3),t.qZA(),t.TgZ(4,"div")(5,"nz-select",7),t.NdJ("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.order.status=i)})("ngModelChange",function(i){t.CHM(e);const s=t.oxw();return t.KtG(s.updateOrderStatus(s.order,i))}),t.qZA()()(),t.TgZ(6,"div",8)(7,"div",9)(8,"div",10)(9,"div",11)(10,"div",12)(11,"h6",13),t._uU(12),t.qZA(),t.TgZ(13,"div")(14,"button",14),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.openCreateSubscriptionModal())}),t._UZ(15,"i",15),t._uU(16," Th\xeam m\u1edbi d\u1ecbch v\u1ee5 "),t.qZA()()(),t.TgZ(17,"div")(18,"nz-table",16)(19,"thead")(20,"tr")(21,"th",17),t._uU(22,"\u1ea2nh s\u1ea3n ph\u1ea9m"),t.qZA(),t.TgZ(23,"th",17),t._uU(24,"Th\xf4ng tin d\u1ecbch v\u1ee5"),t.qZA(),t._UZ(25,"th"),t.qZA()(),t.TgZ(26,"tbody"),t.YNc(27,Zt,18,8,"tr",18),t.qZA()()()(),t.YNc(28,St,22,6,"div",19),t.TgZ(29,"div",20)(30,"div",21)(31,"div",22)(32,"p",23),t._uU(33,"Ghi ch\xfa"),t.qZA(),t.TgZ(34,"button",14),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.openUpdateNoteModal(i.order))}),t._UZ(35,"i",15),t._uU(36," Th\xeam ghi ch\xfa "),t.qZA()(),t.TgZ(37,"div",24),t._uU(38),t.qZA()()(),t.TgZ(39,"div",25)(40,"div",26)(41,"div",22)(42,"p",23),t._uU(43,"\u1ea2nh H\xf3a \u0111\u01a1n"),t.qZA(),t.TgZ(44,"button",14),t.NdJ("click",function(){t.CHM(e);const i=t.oxw();return t.KtG(i.openUpdateBillImageModal(i.order))}),t._UZ(45,"i",15),t._uU(46," Th\xeam m\u1edbi \u1ea3nh h\xf3a \u0111\u01a1n "),t.qZA()(),t.TgZ(47,"div",27)(48,"div",28),t.YNc(49,Ft,1,1,"img",29),t.qZA()()()()(),t.TgZ(50,"div",30)(51,"div",31)(52,"div",32)(53,"strong",33),t._uU(54,"T\xf3m t\u1eaft \u0111\u01a1n h\xe0ng"),t.qZA()(),t.TgZ(55,"div",34)(56,"div",35)(57,"div",36)(58,"span"),t._uU(59,"T\u1ed5ng ti\u1ec1n"),t.qZA(),t.TgZ(60,"span"),t._uU(61),t.ALo(62,"currency"),t.qZA()(),t.YNc(63,yt,6,4,"div",37),t.TgZ(64,"div",36)(65,"div",38)(66,"span",39),t._uU(67,"Thu\u1ebf"),t.qZA(),t._UZ(68,"span",40),t.qZA(),t.TgZ(69,"span"),t._uU(70),t.ALo(71,"currency"),t.qZA()()(),t.TgZ(72,"div",41)(73,"span"),t._uU(74,"S\u1ed1 ti\u1ec1n thanh to\xe1n"),t.qZA(),t.TgZ(75,"span"),t._uU(76),t.ALo(77,"currency"),t.qZA()()()()()()()()}if(2&o){const e=t.oxw();
1t.xp6(3),t.hij("Th\xf4ng tin \u0111\u01a1n h\xe0ng ",e.order.orderNumber,""),t.xp6(2),t.Q6J("ngModel",e.order.status)("nzOptions",e.orderStatusOptions),t.xp6(7),t.hij(" S\u1ea3n ph\u1ea9m(",e.order.orderItems.length,") "),t.xp6(6),t.Q6J("nzData",e.order.orderItems),t.xp6(9),t.Q6J("ngForOf",e.order.orderItems),t.xp6(1),t.Q6J("ngIf",e.order.user),t.xp6(10),t.hij(" ",e.order.note," "),t.xp6(11),t.Q6J("ngIf",e.order.billImage),t.xp6(12),t.Oqu(t.xi3(62,13,e.order.totalPrice,"VND")),t.xp6(2),t.Q6J("ngIf",e.order.discount),t.xp6(7),t.Oqu(t.xi3(71,16,0,"VND")),t.xp6(6),t.Oqu(t.xi3(77,19,e.getOrderFinalTotal(e.order),"VND"))}}const It=function(){return["/","admin","order"]};let _=class{constructor(n,e,r,i,s,l,D,Q,V,Mt){this.orderService=n,this.orderNgxFormService=e,this.subscriptionCommonService=r,this.activatedRoute=i,this.modal=s,this.translate=l,this.notificationService=D,this.viewContainerRef=Q,this.ngxFormManager=V,this.orderItemCommonService=Mt,this.subscriptionReferenceType=F.z,this.fetchData$=new g.X(null),this.orderStatus=u.iF,this.orderStatusOptions=[{value:u.iF.PAID,label:"\u0110\u01a1n h\xe0ng \u0111\xe3 thanh to\xe1n"},{value:u.iF.WAITING,label:"\u0110\u01a1n h\xe0ng \u0111a\u0303 thanh to\xe1n"},{value:u.iF.UNPAID,label:"\u0110\u01a1n h\xe0ng ch\u01b0a thanh to\xe1n"},{value:u.iF.CANCELLED,label:"\u0110\u01a1n h\xe0ng \u0111\xe3 b\u1ecb h\u1ee7y"}],this.createForm=this.orderNgxFormService.referenceSubscriptionForm(),this.editForm=this.orderNgxFormService.referenceSubscriptionForm(),this.updateOrderNoteForm=this.orderNgxFormService.updateOrderNoteForm(),this.updateOrderNoteTemplate=this.orderNgxFormService.updateOrderNoteTemplate(),this.updateOrderBillForm=this.orderNgxFormService.updateOrderBillForm(
1),this.updateOrderBillTemplate=this.orderNgxFormService.updateOrderBillTemplate()}bindReferenceType(n){const e=n.get("referenceType"),r=n.get("reference");!e||(this.orderNgxFormService.setSubscriptionReferenceType(e.value),this.orderNgxFormService.getReferenceLoadingState().pipe((0,T.t)(this)).subscribe(i=>{if(r){if(i)return void r.disable({emitEvent:!1});r.enable({emitEvent:!1})}}),e.valueChanges.pipe((0,T.t)(this)).subscribe(i=>{r?.reset(null,{emitEvent:!1}),r?.disable({emitEvent:!1}),this.orderNgxFormService.setSubscriptionReferenceType(i)}))}getSubscriptionName(n){return n.subscription?.course?.name??n.subscription?.examPack?.name??""}getSubscriptionImage(n){return n.subscription?.course?.image??n.subscription?.examPack?.image??""}getOrderFinalTotal(n){return Math.max((n.totalPrice||0)-(n.discount||0),0)}ngOnInit(){this.bindReferenceType(this.createForm),this.bindReferenceType(this.editForm),(0,P.a)({params:this.activatedRoute.params,fetchData:this.fetchData$}).pipe((0,T.t)(this),(0,N.w)(({params:n})=>this.orderService.show(n.orderId))).subscribe(n=>{this.order=(0,X.yE)(H.K,n.data)})}openCreateSubscriptionModal(){const n=this.modal.create({nzTitle:"Th\xeam",nzContent:b.K,nzWidth:"60vw",nzComponentParams:{form:this.createForm,template:this.orderNgxFormService.referenceSubscriptionTemplate()},nzViewContainerRef:this.viewContainerRef,nzOnOk:()=>{const e=n.getContentComponent().form;if(e.invalid)this.ngxFormManager.markAllAsDirty(e);else{const r={userId:this.order.userId,referenceType:e.get("referenceType")?.value,referenceId:e.get("reference")?.value?.id,planId:e.get("planId")?.value};this.orderService.createSubscription(this.order.id,r).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),this.translate.instant("success.create"),{nzDuration:3e3}),this.fetchData$.next(null),this.createForm.reset(),n.destroy()})}return!1}})}openUpdateNoteModal(n){this.updateOrderNoteForm.setValue({note:n.note});const e=this.modal.create({nzTitle:"C\u1eadp nh\u1eadt ghi ch\xfa",nzContent:b.K,nzWidth:"60vw",nzComponentParams:{form:this.updateOrderNoteForm,template:this.updateOrderNoteTemplate},nzViewContainerRef:this.viewContainerRef,nzOnOk:()=>{const r=e.getContentComponent().form;
1if(r.invalid)this.ngxFormManager.markAllAsDirty(r);else{e.updateConfig({nzOkLoading:!0});const i={note:r.get("note")?.value};this.orderService.updateOrderNote(n.id,i).pipe((0,p.K)(s=>{throw e.updateConfig({nzOkLoading:!1}),s})).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),this.translate.instant("success.create"),{nzDuration:3e3}),this.fetchData$.next(null),this.updateOrderNoteForm.reset(),e.destroy()})}return!1}})}openUpdateBillImageModal(n){n.billImage&&this.updateOrderBillForm.setValue({billImage:[{uid:"1",name:n.billImage,status:"done",url:n.billImage}]});const e=this.modal.create({nzTitle:"C\u1eadp nh\u1eadt \u1ea3nh bill",nzContent:b.K,nzWidth:"60vw",nzComponentParams:{form:this.updateOrderBillForm,template:this.updateOrderBillTemplate},nzViewContainerRef:this.viewContainerRef,nzOnOk:()=>{const r=e.getContentComponent().form;if(r.invalid)this.ngxFormManager.markAllAsDirty(r);else{e.updateConfig({nzOkLoading:!0});const i=r.get("billImage")?.value[0]?.url??null;this.orderService.updateOrderBill(n.id,i).pipe((0,p.K)(s=>{throw e.updateConfig({nzOkLoading:!1}),s})).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),this.translate.instant("success.create"),{nzDuration:3e3}),this.fetchData$.next(null),this.updateOrderBillForm.reset(),e.destroy()})}return!1}})}openEditSubscriptionModal(n){this.editForm.setValue({referenceType:n.subscription.referenceType,reference:n.subscription.course??n.subscription.examPack,planId:n.planId},{emitEvent:!1}),this.orderNgxFormService.setSubscriptionReferenceType(n.subscription.referenceType);const e=this.modal.create({nzTitle:"Th\xeam",nzContent:b.K,nzWidth:"60vw",nzComponentParams:{form:this.editForm,template:this.orderNgxFormService.referenceSubscriptionTemplate()},nzViewContainerRef:this.viewContainerRef,nzOnOk:()=>{const r=e.getContentComponent().form;
1if(r.invalid)this.ngxFormManager.markAllAsDirty(r);else{const i={userId:this.order.userId,referenceType:r.get("referenceType")?.value,referenceId:r.get("reference")?.value?.id,planId:r.get("planId")?.value};this.subscriptionCommonService.update(n.subscription.id,i).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),this.translate.instant("success.update"),{nzDuration:3e3}),this.fetchData$.next(null),this.editForm.reset(),e.destroy()})}return!1}})}updateOrderStatus(n,e){let r="",i="";e===u.iF.CANCELLED?(r="H\u1ee7y \u0111\u01a1n ha\u0300ng",i=`B\u1ea1n ch\u1eafc ch\u1eafn mu\u1ed1n x\xf3a \u0111\u01a1n ha\u0300ng <b>${n.id}</b> ?`):e===u.iF.PAID?(r="X\xe1c nh\u1eadn \u0111\u01a1n h\xe0ng \u0111\xe3 \u0111\u01b0\u1ee3c thanh to\xe1n",i=`B\u1ea1n ch\u1eafc ch\u1eafn \u0111\u01a1n ha\u0300ng <b>${n.id}</b> \u0111\xe3 thanh to\xe1n ?`):(r="X\xe1c nh\u1eadn \u0111\u01a1n ha\u0300ng ch\u01b0a \u0111\u01b0\u1ee3c thanh to\xe1n",i=`X\xe1c nh\u1eadn \u0111\u01a1n ha\u0300ng <b>${n.id}</b> ch\u01b0a thanh to\xe1n?`);const s=this.modal.warning({nzTitle:r,nzContent:i,nzOnOk:()=>{s.updateConfig({nzOkLoading:!0}),this.orderService.updateOrderStatus(n.id,{status:e}).pipe((0,I.b)(()=>s.updateConfig({nzOkLoading:!1})),(0,p.K)(l=>{throw s.updateConfig({nzOkLoading:!1}),l})).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),this.translate.instant("success.common"),{nzDuration:3e3}),s.destroy()})}})}removeOrderItemFromOrder(n){const e=this.modal.warning({nzTitle:"X\xf3a kh\u1ecfi \u0111\u01a1n h\xe0ng",nzContent:`B\u1ea1n \u0111ang x\xf3a <b>${this.getSubscriptionName(n)}</b> kh\u1ecfi \u0111\u01a1n h\xe0ng`,nzOnOk:()=>{e.updateConfig({nzOkLoading:!0}),this.orderItemCommonService.removeOrderItemFromOrder(n.id).pipe((0,I.b)(()=>e.updateConfig({nzOkLoading:!1})),(0,p.K)(r=>{throw e.updateConfig({nzOkLoading:!1}),r})).subscribe(()=>{this.notificationService.success(this.translate.instant("success.title"),this.translate.instant("success.delete"),{nzDuration:3e3}),this.fetchData$.next(null),e.destroy()})}})}};_.\u0275fac=function(n){return new(n||_)(t.Y36($),t.Y36(y),t.Y36(rt.J),t.Y36(m.gz),t.Y36(v.Sf),t.Y36(w.sK),t.Y36(M.g),t.Y36(t.s_b),t.Y36(O.hV),t.Y36(R.o))},_.\u0275cmp=t.Xpm({type:_,selectors:[["app-detail"]],standalone:!0,features:[t._Bn([y]),t.jDz],decls:8,vars:3,consts:[[1,"mb-3"],[3,"routerLink"],["src","/assets/images/previous.svg"],["class","order",4,"ngIf"],[1,"order"],[1,"order__header","d-flex","justify-content-between"],[1,"fs-5"],["nzPlaceHolder","Tr\u1ea1ng th\xe1i",2,"width","250px",3,"ngModel","nzOptions","ngModelChange"],[1,"mt-4"],[1,"row","g-2"],[1,"col-12","col-md-8"],[1,"rounded-3"],[1,"p-3","mb-1","bg-light","d-flex","justify-content-between"],[1,"mb-0","fs-6","fw-semibold"],["nz-button","","nzType","primary",1,"ms-2",3,"click"],["nz-icon","","nzType","plus"],["nzFrontPagination","false",3,"nzData"],[1,"fw-bold"],[4,"ngFor","ngForOf"],["class","rounded-3 mt-3",4,"ngIf"],[1,"order-detail__note","rounded-3","bg-light","mt-3"],[1,"order-detail__note__wrap","p-3"],[1,"d-flex","justify-content-between","align-items-center"],[1,"p-0","fw-5"],[1,"order-detail__note__image","rounded-6","overflow-hidden","mb-3"],[1,"order-detail__bill","rounded-3","bg-light","mt-3"],[1,"order-drtail__bill__wrap","p-3"],[1,"order-detail__bill__image","rounded-6","overflow-hidden","mb-3"],[1,"ratio","ratio-4x1","mt-3"],["nz-image","","class","w-100 object-fit-contain","alt","Bill",3,"nzSrc",4,"ngIf"],[1,"col-12","col-md-4"],[1,"rounded-3","bg-light"],[1,"p-3","border-bottom","border-2","border-white"],[1,"fs-6"],[1,"px-3"],[1,"py-2","border-bottom","border-2","border-white"],[1,"d-flex","justify-content-between"],["class","d-flex justify-content-between",4,"ngIf"],[1,"d-flex","align-items-center"],[1,"me-1"],["nz-icon","","nzType","info-circle","nzTheme","outline",1,"text-primary"],[1,"d-flex","justify-content-between","py-2","fw-bold"],["nzIcon","camera","nzShape","square",3,"nzSize","nzSrc"],[4,"ngIf"],[1,"text-center"],["nz-button","","nzType","link","nzTooltipTitle","S\u1eeda \u0111\u01a1n h\xe0ng","nz-tooltip","",3,"click"],["nz-icon","","nzType","edit",2,"color","#1452d7"],["nz-button","","nzType","link","nzTooltipTitle","X\xf3a kh\u1ecfi \u0111\u01a1n h\xe0ng","nz-tooltip","",3,"click"],["nz-icon","","nzType","delete",2,"color","#cf002a"],["class","fst-italic",4,"ngIf"],[1,"fst-italic"],[1,"rounded-3","mt-3"],[1,"p-3","mb-1","bg-light"],["nz-image","","alt","Bill",1,"w-100","object-fit-contain",3,"nzSrc"]
1],template:function(n,e){1&n&&(t.TgZ(0,"nz-breadcrumb",0)(1,"nz-breadcrumb-item")(2,"a",1),t._UZ(3,"img",2),t._uU(4," Danh s\xe1ch \u0111\u01a1n h\xe0ng"),t.qZA()(),t.TgZ(5,"nz-breadcrumb-item"),t._uU(6,"Chi ti\u1ebft \u0111\u01a1n h\xe0ng"),t.qZA()(),t.YNc(7,Et,78,22,"div",3)),2&n&&(t.xp6(2),t.Q6J("routerLink",t.DdM(2,It)),t.xp6(5),t.Q6J("ngIf",e.order))},dependencies:[h.ez,h.sg,h.O5,h.H9,m.Bz,m.yS,c.u5,c.JJ,c.On,c.UX,v.Qp,J.Rt,J.Dz,z.PV,z.Ls,Z.sL,Z.ix,et.w,nt.dQ,S.X,K.LV,K.Vq,d.HQ,d.N8,d.Uo,d._C,d.Om,d.p0,d.$Z,E.cg,E.SY,k.lt,k.Dg,k.MO,A.Gb,A.Ie],styles:[".ratio-4x1[_ngcontent-%COMP%]{aspect-ratio:4/1}"]}),_=(0,U.gn)([(0,T.c)(),(0,U.w6)("design:paramtypes",[$,y,rt.J,m.gz,v.Sf,w.sK,M.g,t.s_b,O.hV,R.o])],_);const Nt=[{path:"",component:C},{path:":orderId/detail",component:_,data:{breadcrumb:"Chi ti\u1ebft \u0111\u01a1n h\xe0ng"}}];let Dt=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[m.Bz.forChild(Nt),m.Bz]}),o})();const Ut=[x.InfoCircleOutline,x.PlusOutline,x.FormOutline,x.DeleteOutline,x.CheckCircleOutline,x.CameraOutline,x.ExportOutline];let wt=(()=>{class o{}return o.\u0275fac=function(e){return new(e||o)},o.\u0275mod=t.oAB({type:o}),o.\u0275inj=t.cJS({imports:[h.ez,z.PV.forChild(Ut),Dt]}),o})()}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.