PageSourceSearch

https://member.gastrosuisse.ch/js/737.f3628547.js

js gastrosuisse.ch collected 2026-10-02 17:07:46 UTC 10,690 bytes, 2 lines download raw bytes

1"use strict";(self["webpackChunkgs_memberPortal"]=self["webpackChunkgs_memberPortal"]||[]).push([[737],{737:function(e,t,a){a.r(t),a.d(t,{default:function(){return v}});var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("p-container",[a("p-root-portal",[e.vm.visibleDialog&&e.vm.appSystem?a("p-dialog",{attrs:{title:"create"===e.vm.visibleDialog?e.$t("core.page.appSystems.createOrUpdateDialog.createTitle"):e.$t("core.page.appSystems.createOrUpdateDialog.updateTitle")},on:{close:function(t){return e.vm.closeDialog()}},scopedSlots:e._u([{key:"content",fn:function(){return[a("p-row",{attrs:{column:""}},[a("p-text-field",{attrs:{label:e.$t("core.page.appSystems.createOrUpdateDialog.name"),required:""},model:{value:e.vm.appSystem.name,callback:function(t){e.$set(e.vm.appSystem,"name",t)},expression:"vm.appSystem.name"}}),a("p-text-field",{attrs:{label:e.$t("core.page.appSystems.createOrUpdateDialog.tenantKey"),required:""},model:{value:e.vm.appSystem.tenantKey,callback:function(t){e.$set(e.vm.appSystem,"tenantKey",t)},expression:"vm.appSystem.tenantKey"}}),a("p-checkbox",{attrs:{label:e.$t("core.page.appSystems.createOrUpdateDialog.isActive")},model:{value:e.vm.appSystem.isActive,callback:function(t){e.$set(e.vm.appSystem,"isActive",t)},expression:"vm.appSystem.isActive"}}),a("div",[a("p-request-alert",{model:{value:e.vm.appSystemsDataSource.error,callback:function(t){e.$set(e.vm.appSystemsDataSource,"error",t)},expression:"vm.appSystemsDataSource.error"}})],1)],1)]},proxy:!0},{key:"actions",fn:function(){return[a("p-button",{attrs:{secondary:""},on:{click:function(t){return e.vm.closeDialog()}}},[e._v(" "+e._s(e.$t("core.app.cancel"))+" ")]),a("p-button",{on:{click:function(t){return e.vm.createOrEditAppSystem()}}},[e._v(" "+e._s(e.$t("core.app.save"))+" ")])]},proxy:!0}],null,!1,2354592246)}):e._e()],1),a("h2",{staticClass:"mb-4"},[e._v(" "+e._s(e.$t("core.page.appSystems.page.title"))+" ")]),a("p-request-alert",{model:{value:e.vm.appSystemsDataSource.error,callback:function(t){e.$set(e.vm.appSystemsDataSource,"error",t)},expression:"vm.appSystemsDataSource.error"}}),e.vm.appSystemsDataSource.data?a("div",[a("p-row",[a("p-row",{attrs:{xs12:"",md6:"",lg2:""}},[a("p-text-field",{attrs:{clearable:"",label:e.$t("core.app.search"),"context-icon":"search"},model:{value:e.vm.appSystemsDataSource.filter.searchCriteria,callback:function(t){e.$set(e.vm.appSystemsDataSource.filter,"searchCriteria",t)},expression:"vm.appSystemsDataSource.filter.searchCriteria"}})],1)],1),a("p-card",[a("p-surface",{staticClass:"pl-2 mb-2",attrs:{layer:"2"}},[a("p-row",{attrs:{"align-center":""}},[a("p-col",{attrs:{shrink:""}},[a("p-button",{on:{click:function(t){return e.vm.appSystemsDataSource.select()}}},[a("p-icon",{attrs:{dense:""}},[e._v(" refresh ")])],1),a("p-button",{on:{click:function(t){return e.vm.showCreateDialog()}}},[e._v(" "+e._s(e.$t("core.page.appSystems.action.newAppSystem"))+" ")])],1)],1)],1),e.vm.appSystemsDataSource.data?a("p-table",{staticClass:"appSystemList",scopedSlots:e._u([{key:"rows",fn:function(){return[a("tr",[a("th",[e._v(e._s(e.$t("core.page.appSystems.list.id")))]),a("th",[e._v(e._s(e.$t("core.page.appSystems.list.name")))]),a("th",[e._v(e._s(e.$t("core.page.appSystems.list.tenantKey")))]),a("th",[e._v(e._s(e.$t("core.page.appSystems.list.isActive")))]),a("th")]),e._l(e.vm.appSystemsDataSource.data.items,function(t){return a("tr",{key:t.data.id},[a("td",[e._v(" "+e._s(t.data.id)+" ")]),a("td",[e._v(" "+e._s(t.data.name)+" ")]),a("td",[e._v(" "+e._s(t.data.tenantKey)+" ")]),a("td",[e._v(" "+e._s(t.data.isActive)+" ")]),a("td",[a("p-row",{attrs:{nowrap:"","align-center":"","justify-end":"",dense:""}},[a("p-button",{attrs:{disabled:e.vm.appSystemsDataSource.isLoading,dense:""},on:{click:function(a){return e.$router.push("/_admin/"+t.data.id+"/appSystemWebApi")}}},[a("p-icon",{attrs:{dense:""}},[e._v(" settings ")])],1),a("p-button",{attrs:{disabled:e.vm.appSystemsDataSource.isLoading,dense:""},on:{click:function(a){return e.vm.showEditDialog(t.data)}}},[a("p-icon",{attrs:{dense:""}},[e._v(" edit ")])],1),a("p-button",{attrs:{disabled:e.vm.appSystemsDataSource.isLoading,dense:"",secondary:""},on:{click:function(a){return e.vm.onDeleteClick(t)}}},[a("p-icon",{attrs:{dense:"",color:"error"}},[e._v(" delete ")])],1)],1)],1)])})]},proxy:!0}],null,!1,2692790499)}
1):e._e(),a("p-pagination",{model:{value:e.vm.appSystemsDataSource.paging,callback:function(t){e.$set(e.vm.appSystemsDataSource,"paging",t)},expression:"vm.appSystemsDataSource.paging"}})],1)],1):e._e()],1)},s=[],n=a(5471),o=a(7789),r=a(591),p=a(9660);class l extends o.A{constructor(){super(...arguments),this.visibleDialog=void 0,this.appSystem=void 0,this.appSystemsDataSource=new r.A({selectCommand:n.A.$service.v2.api.core.appSystems.getAppSystems,updateCommand:n.A.$service.v2.api.core.appSystems.updateAppSystem,insertCommand:n.A.$service.v2.api.core.appSystems.createAppSystem,deleteCommand:n.A.$service.v2.api.core.appSystems.deleteAppSystem})}async initialize(){await this.appSystemsDataSource.select()}async onDeleteClick(e){n.A.$dialog.confirmDelete(1).then(async t=>{t&&(await this.appSystemsDataSource.delete(e.data.id),await this.appSystemsDataSource.select())})}showCreateDialog(){this.appSystem=new p.A,this.visibleDialog="create"}showEditDialog(e){this.appSystem=e,this.visibleDialog="edit"}closeDialog(){this.visibleDialog=void 0,this.appSystem=void 0}async createOrEditAppSystem(){this.appSystem&&("create"===this.visibleDialog?await this.appSystemsDataSource.insert(this.appSystem):"edit"===this.visibleDialog&&await this.appSystemsDataSource.update(this.appSystem),this.closeDialog(),await this.appSystemsDataSource.select())}}var c=n.A.extend({auth:!0,role:["admin","hostadmin"],layout:"layout-hostadmin",data:()=>({vm:new l}),mounted(){this.vm.initialize()}}),d=c,m=a(1656),u=(0,m.A)(d,i,s,!1,null,null,null),v=u.exports},591:function(e,t,a){a.d(t,{A:function(){return g}});var i=a(5471),s=a(7482),n=a(8890);const o=new Set,r=new WeakMap;function p(e){return!!e.observers&&!!e.proxy&&!!e.observe&&!!e.unobserve}class l{constructor(e,t){let a=!1;const i=this,s=new Proxy(e,{get(e,t){return e[t]},set(e,s,n){return e[s]!==n&&(a&&o.add(t||i),e[s]=n),!0},deleteProperty(e,a){return a in e&&(delete e[a],o.add(t||i),!0)}});(Array.isArray(e)?[...Array(e.length).keys()]:Object.keys(e)).forEach(t=>{const a=e[t];(Array.isArray(a)||"object"===typeof a&&a instanceof Object)&&(s[t]=new l(a,i).proxy)}),this.observers=new Set,this.proxy=s,a=!0}observe(e){var t,a;return(null===(t=this.observers)||void 0===t?void 0:t.has(e))?this.observers:null===(a=this.observers)||void 0===a?void 0:a.add(e)}unobserve(e){var t;return null===(t=this.observers)||void 0===t?void 0:t.delete(e)}clearObservers(){var e;null===(e=this.observers)||void 0===e||e.clear(),this.observers=null}}function c(e,t,a=!1){var i;if(r.has(e)){const a=r.get(e);if(null===(i=null===a||void 0===a?void 0:a.observers)||void 0===i?void 0:i.has(t))return e}const s=p(e)?e:new l(e);s.observe(t);const n=s.proxy;return r.set(n,s),a&&t(),n}function d(){o.forEach(e=>{var t;null===(t=e.observers)||void 0===t||t.forEach(e=>e())}),o.clear(),window.requestAnimationFrame(d)}d();var m=a(9545),u=a(7657),v=a(1824);class g{constructor(e){this._paging={currentPage:void 0,pageSize:void 0,totalCount:void 0,totalPages:void 0},this.onSelecting=new n.A,this.onSelected=new n.A,this.onUpdating=new n.A,this.onUpdated=new n.A,this.onInserting=new n.A,this.onInserted=new n.A,this.onDeleting=new n.A,this.onDeleted=new n.A,this.isLoading=!1,this.error=void 0,this.onError=new n.A,this.onFilterChange=()=>{this._config.noRefreshOnFilterChange||setTimeout(()=>{this.select()},0)},this.onPagingChange=()=>{this._config.noRefreshOnFilterChange||setTimeout(()=>{this.select()},0)},this.isInitialized=!1,this._config=e,this._filter=c({},this.onFilterChange,!1),this.selectCommand=this._config.selectCommand,this.updateCommand=this._config.updateCommand,this.insertCommand=this._config.insertCommand,this.deleteCommand=this._config.deleteCommand}get filter(){return this._filter}set filter(e){this._filter=c(e,this.onFilterChange,!0)}get paging(){return this._paging}set paging(e){this._paging=c(e,this.onPagingChange,!0)}async performCommand(e,...t){this.error=void 0;try{if("function"===typeof e){let a=e(...t);if(void 0===a||null===a)return;return m.A.isPromise(a)&&(a=await a),a}throw new Error("Unable to select data for DataSource, the provided data command was not a function")}catch(a){throw this.error=a,this.onError.invoke(a),a}}async select(...e){var t,a,n,o,r,p,l,c,d,m,g,h,y;this.isLoading=!0,this.onSelecting.invoke();const S=(0,v.A)(this._filter);(null===(t=this._paging)||void 0===t?void 0:t.currentPage)&&(S.paging={},S.paging.currentPage=this._paging.currentPage,S.paging.pageSize=this._paging.pageSize,S.paging.includeCount=!0);const f=await this.performCommand(this.selectCommand,S,...e),_=null===f||void 0===f?void 0:f.items;
1(0,s.A)(_)?_.forEach(e=>{(0,u.qo)(e)&&(e._dataSource=this)}):(0,u.qo)(f)&&(f._dataSource=this),i.A.set(this,"data",f);const b=null===f||void 0===f?void 0:f.paginationData;return!(null===b||void 0===b?void 0:b.currentPage)||this._paging.currentPage===b.currentPage&&this._paging.pageSize===(null!==(a=b.pageSize)&&void 0!==a?a:null===(n=S.paging)||void 0===n?void 0:n.pageSize)&&this._paging.totalCount===(null!==(o=b.totalCount)&&void 0!==o?o:null===(r=S.paging)||void 0===r?void 0:r.totalCount)&&this._paging.totalPages===(null!==(p=b.totalPages)&&void 0!==p?p:null===(l=S.paging)||void 0===l?void 0:l.totalPages)||(this._paging.currentPage=b.currentPage,this._paging.pageSize=null!==(c=b.pageSize)&&void 0!==c?c:null===(d=S.paging)||void 0===d?void 0:d.pageSize,this._paging.totalCount=null!==(m=b.totalCount)&&void 0!==m?m:null===(g=S.paging)||void 0===g?void 0:g.totalCount,this._paging.totalPages=null!==(h=b.totalPages)&&void 0!==h?h:null===(y=S.paging)||void 0===y?void 0:y.totalPages),this.isLoading=!1,this.onSelected.invoke(this.data),this.data}async delete(e,...t){this.isLoading=!0,this.onDeleting.invoke();const a="object"===typeof e?e:{id:e},i=await this.performCommand(this.deleteCommand,a,...t);return this.isLoading=!1,this.onDeleted.invoke(i),i}async update(e,...t){this.isLoading=!0,this.onUpdating.invoke();const a=await this.performCommand(this.updateCommand,e,...t);return this.isLoading=!1,this.onUpdated.invoke(a),a}async insert(e,...t){this.isLoading=!0,this.onInserting.invoke();const a=await this.performCommand(this.insertCommand,e,...t);return this.isLoading=!1,this.onInserted.invoke(a),a}async initialize(){return await this.select(),this.isInitialized=!0,this}}}}]);
2//# sourceMappingURL=737.f3628547.js.map

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.