1"use strict";(self["webpackChunkgs_memberPortal"]=self["webpackChunkgs_memberPortal"]||[]).push([[4372],{4372:function(e,t,i){i.r(t),i.d(t,{default:function(){return h}});var r=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("p-container",{staticClass:"gs-shop-articles-admin",attrs:{fluid:""}},[i("p-row",[i("p-col",{attrs:{xs12:"",md6:"",lg2:""}},[i("p-text-field",{attrs:{clearable:"",label:e.$t("core.app.search"),"context-icon":"search"},model:{value:e.filter.searchCriteria,callback:function(t){e.$set(e.filter,"searchCriteria",t)},expression:"filter.searchCriteria"}})],1),i("p-col",{attrs:{xs12:"",md6:"",lg2:""}},[i("p-date-field",{attrs:{clearable:"",label:e.$t("shop.article.validFrom")},model:{value:e.filter.validFrom,callback:function(t){e.$set(e.filter,"validFrom",t)},expression:"filter.validFrom"}})],1),i("p-col",{attrs:{xs12:"",md6:"",lg2:""}},[i("p-date-field",{attrs:{clearable:"",label:e.$t("shop.article.validTo")},model:{value:e.filter.validTo,callback:function(t){e.$set(e.filter,"validTo",t)},expression:"filter.validTo"}})],1),i("p-col",{attrs:{xs12:"",md6:"",lg2:""}},[i("p-select",{attrs:{clearable:"",label:e.$t("shop.article.deliveryCost"),items:e.shippingCost},model:{value:e.filter.hasShipping,callback:function(t){e.$set(e.filter,"hasShipping",t)},expression:"filter.hasShipping"}})],1),i("p-col",{attrs:{xs12:"",md6:"",lg2:""}},[i("p-select",{attrs:{clearable:"",label:e.$t("shop.article.productType"),items:e.productType},model:{value:e.filter.productType,callback:function(t){e.$set(e.filter,"productType",t)},expression:"filter.productType"}})],1),i("p-col",{attrs:{xs12:"",md6:"",lg2:""}},[i("p-select",{attrs:{clearable:"",label:e.$t("shop.article.status"),items:e.status},model:{value:e.filter.isPublished,callback:function(t){e.$set(e.filter,"isPublished",t)},expression:"filter.isPublished"}})],1)],1),i("p-row",[i("p-col",{attrs:{xs12:""}},[i("p-request-alert",{model:{value:e.requestError,callback:function(t){e.requestError=t},expression:"requestError"}})],1)],1),i("p-list-view",{ref:"ordersList",attrs:{pagination:e.pagination,"service-function":e.populateData,columns:e.columns},on:{"update:pagination":function(t){e.pagination=t}},scopedSlots:e._u([{key:"table-actions",fn:function(){return[i("p-button",{attrs:{disabled:""},on:{click:function(t){return e.createNewArticle()}}},[e._v(" "+e._s(e.$t("shop.article.create"))+" ")])]},proxy:!0},{key:"isPublished",fn:function(t){return[i("p-row",{attrs:{"justify-center":""}},[i("p-checkbox",{attrs:{readonly:""},model:{value:t.row.isPublished.value,callback:function(i){e.$set(t.row.isPublished,"value",i)},expression:"entry.row.isPublished.value"}})],1)]}},{key:"hasLicense",fn:function(t){return[i("p-row",{attrs:{"justify-center":""}},[i("p-checkbox",{attrs:{readonly:""},model:{value:t.row.hasLicense.value,callback:function(i){e.$set(t.row.hasLicense,"value",i)},expression:"entry.row.hasLicense.value"}})],1)]}},{key:"isDownload",fn:function(t){return[i("p-row",{attrs:{"justify-center":""}},[i("p-checkbox",{attrs:{readonly:""},model:{value:t.row.isDownload.value,callback:function(i){e.$set(t.row.isDownload,"value",i)},expression:"entry.row.isDownload.value"}})],1)]}},{key:"hasShipping",fn:function(t){return[i("p-row",{attrs:{"justify-center":""}},[i("p-checkbox",{attrs:{readonly:""},model:{value:t.row.hasShipping.value,callback:function(i){e.$set(t.row.hasShipping,"value",i)},expression:"entry.row.hasShipping.value"}})],1)]}},{key:"entry-actions",fn:function(t){var r=t.entry;return[i("p-row",{attrs:{dense:"",nowrap:""}},[i("p-button",{on:{click:function(t){return e.goToDetailEditPage(r.id.value)}}},[i("p-icon",[e._v("edit")])],1)],1)]}}]),model:{value:e.list,callback:function(t){e.list=t},expression:"list"}})],1)},a=[],s=i(4795),n=i(5471),o=n.A.extend({name:"GsShopArticlesAdmin",role:["Admin","Hostadmin"],auth:!0,props:{},data:()=>({filter:{searchCriteria:void 0,validFrom:void 0,validTo:void 0,hasShipping:void 0,productType:void 0,isPublished:void 0},pagination:{},innerPagination:{"paging.CurrentPage":void 0,"paging.PageSize":void 0,"paging.IncludeCount":void 0,"paging.NoPaging":void 0},list:{},columns:[],requestError:void 0}),computed:{querySearchCriteria(){return this.$router.currentRoute.query.searchCriteria},queryValidTo(){return this.$router.currentRoute.query.validTo},queryValidFrom(){return this.$router.currentRoute.query.validFrom},queryHasShipping(){return this.$router.currentRoute.query.hasShipping},queryhasLicense(){return this.$router.currentRoute.query.hasLicense},queryIsPublished(){return this.$router.currentRoute.query.isPublished},queryCurrentPage(){return this.$router.currentRoute.query.currentPage},queryPageSize(){return this.$router.currentRoute.query.pageSize},request(){return(new s.A).fromModel(Object.assign(Object.assign({},this.filter),this.innerPagination))},shippingCost(){return[{caption:this.$t("shop.article.deliveryCost.hasDeliveryCost"),id:!0},{caption:this.$t("shop.article.deliveryCost.noDeliveryCost"),id:!1}]},productType(){return[{caption:this.$t("shop.article.productType.digital"),id:0},{caption:this.$t("shop.article.productType.physical"),id:1},{caption:this.$t("shop.article.productType.isDownload"),id:2}
1]},status(){return[{caption:this.$t("shop.article.status.published"),id:!0},{caption:this.$t("shop.article.status.draft"),id:!1}]}},watch:{filter:{deep:!0,handler(){this.pagination.currentPage=1,this.innerPagination["paging.CurrentPage"]=1,this.$debounce(()=>{this.refresh()},300,this)()}},request(){this.writeRequestToQuery()}},beforeMount(){this.getQueryFromRequest(),this.pagination.currentPage=this.innerPagination["paging.CurrentPage"],this.pagination.pageSize=this.innerPagination["paging.PageSize"]},mounted(){this.columns=[{value:"",field:"filter"},{value:this.$t("shop.article.name"),field:"caption",format:e=>this.$format.ellipsis(e,40)},{value:this.$t("shop.article.articleNumber"),field:"articleNumber"},{value:this.$t("shop.article.pricePerUnit"),field:"unitGrossPrice",format:e=>this.$format.currency(parseFloat(e),"CHF"),textAlign:"right"},{value:this.$t("shop.article.isPublished"),field:"isPublished",width:"50px"},{value:this.$t("shop.article.validFrom"),field:"validFrom",format:e=>this.$date(e).format("DD.MM.YYYY")},{value:this.$t("shop.article.validTo"),field:"validTo",format:e=>e?this.$date(e).format("DD.MM.YYYY"):void 0},{value:this.$t("shop.article.hasLicense"),field:"hasLicense",width:"50px"},{value:this.$t("shop.article.isDownload"),field:"isDownload",width:"50px"},{value:this.$t("shop.article.hasDeliveryCost"),field:"hasShipping",width:"50px"}]},methods:{refresh(){const e=this.$refs.ordersList;null===e||void 0===e||e.populateList()},getQueryFromRequest(){const e=new s.A;e.fromQuery(this.$routerUtils.getQueryParams()),this.filter.searchCriteria=e.searchCriteria,this.filter.isPublished=e.isPublished,this.filter.productType=e.productType,this.filter.hasShipping=e.hasShipping,this.filter.validFrom=e.validFrom,this.filter.validTo=e.validTo,this.innerPagination["paging.CurrentPage"]=e["paging.CurrentPage"],this.innerPagination["paging.PageSize"]=e["paging.PageSize"],this.innerPagination["paging.IncludeCount"]=e["paging.IncludeCount"],this.innerPagination["paging.NoPaging"]=e["paging.NoPaging"]},async writeRequestToQuery(){this.$debounce(()=>{this.$routerUtils.updateQueryParams(this.request.toQuery(),{preserve:!1})},200,this.writeRequestToQuery)()},createNewArticle(){this.$router.push("/gs/shop/articles/create",()=>{})},goToDetailEditPage(e){this.$router.push(`/gs/shop/articles/${e}/edit`,()=>{})},populateData(e){return this.innerPagination["paging.CurrentPage"]=e.query["paging.CurrentPage"],this.innerPagination["paging.PageSize"]=e.query["paging.PageSize"],this.innerPagination["paging.IncludeCount"]=e.query["paging.IncludeCount"],this.innerPagination["paging.NoPaging"]=e.query["paging.NoPaging"],this.$service.api.shopArticles.getShopArticles(this.request)}}}),l=o,u=i(1656),p=(0,u.A)(l,r,a,!1,null,null,null),h=p.exports},4795:function(e,t,i){i.d(t,{A:function(){return s}});var r=i(6530);class a extends r.A{get isPublished(){return this.dto.isPublished}set isPublished(e){this.dto.isPublished=e}get productType(){return this.dto.productType}set productType(e){this.dto.productType=e}get hasShipping(){return this.dto.hasShipping}set hasShipping(e){this.dto.hasShipping=e}get validFrom(){return this.dto.validFrom}set validFrom(e){this.dto.validFrom=e}get validTo(){return this.dto.validTo}set validTo(e){this.dto.validTo=e}get exclude(){return this.dto.exclude}set exclude(e){this.dto.exclude=e}get searchCriteria(){return this.dto.searchCriteria}set searchCriteria(e){this.dto.searchCriteria=e}get"paging.CurrentPage"(){return this.dto["paging.CurrentPage"]}set"paging.CurrentPage"(e){this.dto["paging.CurrentPage"]=e}get"paging.PageSize"(){return this.dto["paging.PageSize"]}set"paging.PageSize"(e){this.dto["paging.PageSize"]=e}get"paging.IncludeCount"(){return this.dto["paging.IncludeCount"]}set"paging.IncludeCount"(e){this.dto["paging.IncludeCount"]=e}get"paging.NoPaging"(){return this.dto["paging.NoPaging"]}set"paging.NoPaging"(e){this.dto["paging.NoPaging"]=e}transformFromQuery(e){const t={};let i;Object.keys(e).forEach(i=>{t[i.toLowerCase()]=e[i]}),i="true"===t.isPublished||t.ispublished,i="false"!==t.isPublished&&void 0,this.dto.isPublished=i,i=Number.parseFloat(t.producttype),i=Number.isNaN(i)?void 0:i,this.dto.productType=i,i="true"===t.hasShipping||t.hasshipping,i="false"!==t.hasShipping&&void 0,this.dto.hasShipping=i,this.dto.validFrom=t.validfrom,this.dto.validTo=t.validto,this.dto.searchCriteria=t.searchcriteria,i=Number.parseFloat(t["paging.currentpage"]),i=Number.isNaN(i)?void 0:i,this.dto["paging.CurrentPage"]=i,i=Number.parseFloat(t["paging.pagesize"]),i=Number.isNaN(i)?void 0:i,this.dto["paging.PageSize"]=i,i="true"===t["paging.IncludeCount"]||t["paging.includecount"],i="false"!==t["paging.IncludeCount"]&&void 0,this.dto["paging.IncludeCount"]=i,i="true"===t["paging.NoPaging"]||t["paging.nopaging"],i="false"!==t["paging.NoPaging"]&&void 0,this.dto["paging.NoPaging"]=i}}class s extends a{}}}]); 2//# sourceMappingURL=4372.d7f70ec6.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.