PageSourceSearch

https://partner.restoplatform.com/chunk-BERHGK3I.js

js restoplatform.com collected 2026-10-01 11:57:06 UTC 5,864 bytes, 1 lines download raw bytes

1import{b as X,c as Z,d as ee,e as te,f as ie,g as ne,h as oe,i as ae,j as re,k as me,l as le}from"./chunk-4EOZ4GQM.js";import{a as de,b as se}from"./chunk-LOPE2D3P.js";import{a as q,b as J}from"./chunk-5HEDMDRO.js";import"./chunk-TA4CGIW5.js";import"./chunk-ERKFY33D.js";import"./chunk-DSUZVMNK.js";import{b as G,c as Y}from"./chunk-WKH5W2V2.js";import{a as z}from"./chunk-IBZUQYXW.js";import{b as j,i as U}from"./chunk-7B5TRSS4.js";import{b as R,g as P,j as V,u as O}from"./chunk-4T2PTKQJ.js";import{a as Q}from"./chunk-QG57Z74K.js";import{a as F}from"./chunk-6AO5R6CW.js";import"./chunk-JCQ33YRD.js";import{T as A,U as K,V as W}from"./chunk-2GKCQ5UO.js";import{d as N}from"./chunk-KBT7HGMR.js";import{a as H,b as $}from"./chunk-AZMSRLP2.js";import{j as I,k as B}from"./chunk-J32AD3W7.js";import{Ab as y,Cb as x,Cc as E,Ec as k,Hb as C,Ib as i,Jb as o,Kb as M,Ob as p,Pb as c,Rb as v,Vb as u,Xa as m,Xb as w,ba as _,ha as h,ia as b,jc as a,kb as S,kc as f,pc as D,qb as s,qc as T,rc as L,ua as g}from"./chunk-YOAD7BVF.js";import"./chunk-55GY6K5S.js";function ce(e,t){e&1&&M(0,"mat-progress-bar",3)}function fe(e,t){e&1&&(i(0,"th",18),a(1,"Name"),o())}function ue(e,t){if(e&1&&(i(0,"td",19),a(1),o()),e&2){let n=t.$implicit;m(),f(n.name1)}}function _e(e,t){e&1&&(i(0,"th",18),a(1,"Group"),o())}function Me(e,t){if(e&1&&(i(0,"td",19),a(1),o()),e&2){let n=t.$implicit;m(),f(n.groupName||"\u2014")}}function Ce(e,t){e&1&&(i(0,"th",18),a(1,"Default price"),o())}function he(e,t){if(e&1&&(i(0,"td",19),a(1),E(2,"number"),o()),e&2){let n=t.$implicit;m(),f(k(2,1,n.defaultPrice,"1.2-2"))}}function be(e,t){e&1&&(i(0,"th",18),a(1,"Default"),o())}function ge(e,t){if(e&1&&(i(0,"td",19),a(1),o()),e&2){let n=t.$implicit;m(),f(n.isDefault?"Yes":"No")}}function we(e,t){e&1&&(i(0,"th",18),a(1,"Status"),o())}function Se(e,t){if(e&1&&(i(0,"td",19),a(1),o()),e&2){let n=t.$implicit;m(),f(n.disabled?"Disabled":"Active")}}function ye(e,t){e&1&&M(0,"th",18)}function xe(e,t){if(e&1){let n=v();i(0,"td",19)(1,"button",20),u("click",function(){let l=h(n).$implicit,d=w();return b(d.edit(l))}),i(2,"mat-icon"),a(3,"edit"),o()(),i(4,"button",21),u("click",function(){let l=h(n).$implicit,d=w();return b(d.toggleDisabled(l))}),i(5,"mat-icon"),a(6),o()()()}if(e&2){let n=t.$implicit;m(6),f(n.disabled?"visibility":"visibility_off")}}function ve(e,t){e&1&&M(0,"tr",22)}function De(e,t){e&1&&M(0,"tr",23)}var pe=class e{api=_(Q);appState=_(F);router=_(N);snackBar=_(q);columns=["name","group","price","default","status","actions"];rows=g([]);loading=g(!0);searchTerm="";ngOnInit(){this.load()}load(){let t=this.appState.selectedRestaurantId;if(!t){this.loading.set(!1);return}this.loading.set(!0),this.api.searchModifiers({searchText:"",pageIndex:0,pageSize:500,sortField:"name1",sortDirection:"asc"},t).subscribe({next:n=>{let r=n.items??[],l=this.searchTerm.trim().toLowerCase();l&&(r=r.filter(d=>(d.name1??"").toLowerCase().includes(l)||(d.groupName??"").toLowerCase().includes(l))),this.rows.set(r),this.loading.set(!1)},error:()=>{this.rows.set([]),this.loading.set(!1),this.snackBar.open("Failed to load modifiers","OK",{duration:3e3})}})}addNew(){this.router.navigate(["/r/menu/modifiers/new"])}edit(t){t.id&&this.router.navigate(["/r/menu/modifiers",t.id])}toggleDisabled(t){t.id&&this.api.voidRecoverModifier(t.id).subscribe({next:()=>{this.snackBar.open("Updated","OK",{duration:2e3}),this.load()},error:()=>this.snackBar.open("Update failed","OK",{duration:3e3})})}static \u0275fac=function(n){return new(n||e)};static \u0275cmp=S({type:e,selectors:[["app-modifier-list"]],decls:36,vars:5,consts:[[1,"page"],[1,"page-header"],["mat-flat-button","","color","primary","type","button",3,"click"],["mode","indeterminate"],["appearance","outline",1,"search-field"],["matInput","",3,"ngModelChange","keyup.enter","ngModel"],["mat-stroked-button","","type","button",3,"click"],["mat-table","",1,"width-100",3,"dataSource"],["matColumnDef","name"],["mat-header-cell","",4,"matHeaderCellDef"],["mat-cell","",4,"matCellDef"],["matColumnDef","group"],["matColumnDef","price"],["matColumnDef","default"],["matColumnDef","status"],["matColumnDef","actions"],["mat-header-row","",4,"matHeaderRowDef"],["mat-row","",4,"matRowDef","matRowDefColumns"],["mat-header-cell",""],["mat-cell",""],["mat-icon-button","","type","button","title","Edit",3,"click"],["mat-icon-button","","type","button","title","Enable / disable",3,"click"],["mat-header-row",""],["mat-row",""]],template:function(n,r){n&1&&(i(0,"div",0)(1,"div",1)(2,"h1"),a(3,"Modifiers"),o(),i(4,"button",2),u("click",function(){return r.addNew()}),i(5,"mat-icon"),a(6,"add"),o(),a(7," Add modifier "),o()(),y(8,ce,1,0,"mat-progress-bar",3),i(9,"mat-form-field",4)(10,"mat-label"),a(11,"Search"),o(),i(12,"input",5),L("ngModelChange",function(d){return T(r.searchTerm,d)||(r.searchTerm=d),d}),u("keyup.enter",function(){return r.load()}),o()(),i(13,"button",6),u("click",function(){return r.load()}),a(14,"Search"),o(),i(15,"table",7),p(16,8),s(17,fe,2,0,"th",9)(18,ue,2,1,"td",10),c(),p(19,11),s(20,_e,2,0,"th",9)(21,Me,2,1,"td",10),c(),p(22,12),s(23,Ce,2,0,"th",9)(24,he,3,4,"td",10),c(),p(25,13),s(26,be,2,0,"th",9)(27,ge,2,1,"td",10),c(),p(28,14),s(29,we,2,0,"th",9)(30,Se,2,1,"td",10),c(),p(31,15),s(32,ye,1,0,"th",9)(33,xe,7,1,"td",10),c(),s(34,ve,1,0,"tr",16)(35,De,1,0,"tr",17),o()()),n&2&&(m(8),x(r.loading()?8:-1),m(4),D("ngModel",r.searchTerm),m(3),C("dataSource",r.rows()),m(19),C("matHeaderRowDef",r.columns),m(),C("matRowDefColumns",r.columns))},dependencies:[B,O,R,P,V,le,X,ee,oe,te,Z,ae,ie,ne,re,me,z,U,j,Y,G,W,K,A,$,H,se,de,J,I],styles:[".page-header[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin-bottom:1rem}.search-field[_ngcontent-%COMP%]{width:min(420px,100%);margin-right:.5rem}.width-100[_ngcontent-%COMP%]{width:100%}"]})};export{pe as ModifierListComponent};

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.