PageSourceSearch

https://www.progold.eu/chunk-I7SLSV43.js

js progold.eu collected 2026-10-09 21:53:09 UTC 16,607 bytes, 3 lines download raw bytes

1import{Jb as zt,Sb as At,la as xt,m as S,qb as bt,rb as B,sb as j,tb as Rt,ub as Dt,vb as wt,wb as Nt,xb as Bt}from"./chunk-2EGU7YKH.js";import"./chunk-XXJ5KP6J.js";import"./chunk-CAQC7JX5.js";import"./chunk-OQSEJWXG.js";import"./chunk-LB2SIPUX.js";import"./chunk-YU5IEYKE.js";import"./chunk-TNG3WTDY.js";import"./chunk-DBPN64ZI.js";import{a as St}from"./chunk-PXIE55XG.js";import"./chunk-76J53O4D.js";import"./chunk-7IEHGNLB.js";import{h as vt}from"./chunk-P5CCJ2SN.js";import"./chunk-NEQO7ITA.js";import"./chunk-ILIGNJRC.js";import{a as yt,c as Pt}from"./chunk-FM5MQBX4.js";import"./chunk-KJ2DTZTE.js";import{a as Tt}from"./chunk-3RKFVFMW.js";import"./chunk-6LRNCJRQ.js";import"./chunk-BYUXZABT.js";import"./chunk-CSKO464Y.js";import"./chunk-RFZ65DFT.js";import"./chunk-ZAELU3GP.js";import"./chunk-KCBWTIVH.js";import"./chunk-Q7LOV5U2.js";import"./chunk-GSJIPMUW.js";import"./chunk-2D6KGTZB.js";import"./chunk-ZS7OWNSY.js";import"./chunk-DIZWDXBB.js";import{E as Mt,F as Ot}from"./chunk-Q4MTVQC2.js";import{b as Et}from"./chunk-RRAYDVNW.js";import{Kd as ht,Na as Ct,a as V,qe as v,za as It}from"./chunk-WGWIBZ2L.js";import{$b as w,$c as ct,Bd as ft,Cc as lt,D as J,Ea as G,Fa as q,Fc as E,Ga as Z,Gc as mt,Ib as u,Id as _t,La as tt,O as Y,Ob as T,Oc as s,Pc as m,Qb as U,Qc as N,Rb as L,Sb as H,T as Q,Tb as l,Ub as c,Vb as f,Wb as nt,Xb as ot,Zb as rt,ac as C,db as et,dc as _,gf as K,hb as p,ic as at,jc as pt,kc as st,lb as x,md as dt,pc as d,qa as W,qc as h,qd as gt,rc as M,tb as P,td as ut,ua as X,ub as D,va as R,w as $,xa as k,xb as it,ya as O,zb as g}from"./chunk-6LP6WHZQ.js";import"./chunk-5KTCK5IS.js";var z=(function(t){return t[t.New=0]="New",t[t.InProgress=1]="InProgress",t[t.Success=2]="Success",t[t.Error=3]="Error",t})(z||{});var A=(()=>{class t{constructor(e,i){this.http=e,this.notificationService=i,this.apiEndpoint=O(It)+"/imports",this.getImportHistory=n=>{let o=new ft;return o=o.append("pageNumber",n.pageNumber.toString()),o=o.append("pageSize",n.pageSize.toString()),this.http.get(`${this.apiEndpoint}`,{params:o}).pipe(J(r=>({items:r.items.map(I=>({id:I.id,fileName:I.fileName,createdBy:I.createdBy,createdOn:I.createdOn,updatedBy:I.updatedBy,updatedOn:I.updatedOn,status:I.status,importSummaryDetails:this.getMessagesForRow(I.validationErrors??"",I.importSummary??"")})),pageSize:r.pageSize,pagesCount:r.pagesCount,pageNumber:r.pageNumber,totalItemsCount:r.totalItemsCount})))},this.uploadExcel=n=>{let o=new FormData;if(n)return o.append("file",n),this.http.post(this.apiEndpoint,o,{observe:"response"}).pipe(W(r=>{r.status===S.Accepted&&this.notificationService.success("NOTIFICATION.SUCCESS.FILE_ACCEPTED")}),Q(r=>{switch(r.status){case S.Unauthorized:this.notificationService.error("NOTIFICATION.FAILURE.UNAUTHORIZED_USER");break;case S.BadRequest:this.notificationService.error("NOTIFICATION.FAILURE.EMPTY_FILE");break;case S.Conflict:this.notificationService.error("NOTIFICATION.FAILURE.FILE_ALREADY_EXIST");break;case S.InternalServerError:this.notificationService.error("NOTIFICATION.FAILURE.INTERNAL_SERVER_ERROR");break;default:this.notificationService.error("NOTIFICATION.FAILURE.INTERNAL_SERVER_ERROR");break}return $({})}))},this.getMessagesForRow=(n,o)=>{let r=new Map;return r.set("Errors",this.getValidationErrors(n)),r.set("Organizations import errors",this.getOrganizationImportErrors(n)),r.set("Users import errors",this.getUsersImportErrors(n)),r.set("Jobs import errors",this.getJobsImportErrors(n)),r.set("Success",this.getImportSuccessMessages(o)),r}}getValidationErrors(e){let n=this.validationErrorsSubstring(e);return this.findAllOccurings(n,"==>")}validationErrorsSubstring(e){return this.getStringBetween(e,"Errors:","OrganizationsImportFailedError=")}getOrganizationImportErrors(e){let i=this.getStringBetween(e,"OrganizationsImportFailedError=","UsersImportFailedError=");return i?[i]:[]}getUsersImportErrors(e){let i=this.getStringBetween(e,"UsersImportFailedError=","JobsImportFailedError=");return i?[i]:[]}getJobsImportErrors(e){let i=this.getStringBetween(e,"JobsImportFailedError=");return i?[i]:[]}getImportSuccessMessages(e){let n=e.replace("Success:","");return this.findAllOccurings(n,"==>")}getStringBetween(e,i,n=null){let o=e.lastIndexOf(i),r=e.lastIndexOf(n)===-1||!n?e.length:e.lastIndexOf(n);return o===-1?"":e.substring(o+i.length,r).trim()}findAllOccurings(e,i){let n=i.length,o=this.findAllIndices(e,i),r=[];for(let y=0;y<o.length;y++)r.push(e.substring(o[y]+n,y+1<o.length?o[y+1]:e.length));return r}findAllIndices(e,i){let n=new RegExp(i,"gi"),o=[],r;for(;r=n.exec(e);)o.push(r.index);return o}static{this.\u0275fac=function(i){return new(i||t)(k(_t),k(vt))}}static{this.\u0275prov=X({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Kt=t=>({number:t});function jt(t,a){if(t&1&&(l(0,"div",1)(1,"p-message",2),d(2),s(3,"transloco"),c()()),t&2){let e=C(2);p(2),h(N(3,1,"ADMIN.BULK_IMPORT.ERRORS_NR",E(4,Kt,e.errorMessagesNumber)))}}function $t(t,a){t&1&&(l(0,"div",1)(1,"p-message",3),d(2),s(3,"transloco"),c()()),t&2&&(p(2),h(m(3,1,"ADMIN.BULK_IMPORT.SUCCESS_NR")))}function Jt(t,a){if(t&1&&(l(0,"div",4),d(1),c()),t&2){let e=C().$implicit;p(),h(e)}}function Yt(t,a){if(t&1&&(l(0,"p"),d(1),c()),t&2){let e=a.$implicit;p(),h(e)}}
1function Qt(t,a){if(t&1&&(nt(0),g(1,Jt,2,1,"div",4),l(2,"div",5),L(3,Yt,2,1,"p",null,U),c(),ot()),t&2){let e=a.$implicit,i=C(2);p(),T(i.rowDetails.get(e).length>0?1:-1),p(2),H(i.rowDetails.get(e))}}function Wt(t,a){if(t&1&&(l(0,"div",0),g(1,jt,4,6,"div",1)(2,$t,4,3,"div",1),L(3,Qt,5,1,"ng-container",null,U),c()),t&2){let e,i=C();p(),T((e=i.status)==="Error"?1:e==="Completed"?2:-1),p(2),H(i.rowDetails.keys())}}function Xt(t,a){t&1&&(d(0),s(1,"transloco")),t&2&&M(" ",m(1,1,"ADMIN.BULK_IMPORT.ERRORS_NOT_FOUND"),`
2`)}var Ut=(()=>{class t{constructor(){this.errorMessagesNumber=0}ngOnChanges({rowDetails:e}){e&&this.calculateErrorCount()}calculateErrorCount(){for(let e of this.rowDetails.values())e.length>0&&(e.some(i=>i.includes("Error occurred, roll back performed"))===!1?this.errorMessagesNumber=e.length:this.errorMessagesNumber=e.length-1)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=P({type:t,selectors:[["ppg-import-history-row-details"]],inputs:{status:"status",rowDetails:"rowDetails"},standalone:!1,features:[G],decls:2,vars:1,consts:[[1,"row-details"],[1,"row-details-header"],["data-test-id","importHistoryRowDetails.errorMessage","severity","error","icon","pi pi-times-circle"],["data-test-id","importHistoryRowDetails.completedMessage","severity","success","icon","pi pi-check"],[1,"row-detail-title"],[1,"row-detail-details"]],template:function(i,n){i&1&&g(0,Wt,5,1,"div",0)(1,Xt,2,3),i&2&&T(n.status==="Completed"||n.status==="Error"?0:1)},dependencies:[Mt,v],styles:['.padding-none[_ngcontent-%COMP%]{padding:0!important}.padding-small[_ngcontent-%COMP%]{padding:size(1)!important}.padding-medium[_ngcontent-%COMP%]{padding:size(2)!important}.padding-large[_ngcontent-%COMP%]{padding:size(3)!important}.padding-xl[_ngcontent-%COMP%]{padding:size(4)!important}.padding-xxl[_ngcontent-%COMP%]{padding:size(5)!important}.padding-top-none[_ngcontent-%COMP%]{padding-top:0!important}.padding-top-small[_ngcontent-%COMP%]{padding-top:size(1)!important}.padding-top-medium[_ngcontent-%COMP%]{padding-top:size(2)!important}
2.padding-top-large[_ngcontent-%COMP%]{padding-top:size(3)!important}.padding-top-xl[_ngcontent-%COMP%]{padding-top:size(4)!important}.padding-top-xxl[_ngcontent-%COMP%]{padding-top:size(5)!important}.padding-right-none[_ngcontent-%COMP%]{padding-right:0!important}.padding-right-small[_ngcontent-%COMP%]{padding-right:size(1)!important}.padding-right-medium[_ngcontent-%COMP%]{padding-right:size(2)!important}.padding-right-large[_ngcontent-%COMP%]{padding-right:size(3)!important}.padding-right-xl[_ngcontent-%COMP%]{padding-right:size(4)!important}.padding-right-xxl[_ngcontent-%COMP%]{padding-right:size(5)!important}.padding-bottom-none[_ngcontent-%COMP%]{padding-bottom:0!important}.padding-bottom-small[_ngcontent-%COMP%]{padding-bottom:size(1)!important}.padding-bottom-medium[_ngcontent-%COMP%]{padding-bottom:size(2)!important}.padding-bottom-large[_ngcontent-%COMP%]{padding-bottom:size(3)!important}.padding-bottom-xl[_ngcontent-%COMP%]{padding-bottom:size(4)!important}.padding-bottom-xxl[_ngcontent-%COMP%]{padding-bottom:size(5)!important}.padding-left-none[_ngcontent-%COMP%]{padding-left:0!important}.padding-left-small[_ngcontent-%COMP%]{padding-left:size(1)!important}.padding-left-medium[_ngcontent-%COMP%]{padding-left:size(2)!important}.padding-left-large[_ngcontent-%COMP%]{padding-left:size(3)!important}.padding-left-xl[_ngcontent-%COMP%]{padding-left:size(4)!important}.padding-left-xxl[_ngcontent-%COMP%]{padding-left:size(5)!important}.font-size-xs-1[_ngcontent-%COMP%]{font-size:.5625rem!important}.font-size-xs-2[_ngcontent-%COMP%]{font-size:.625rem!important}.font-size-xs-3[_ngcontent-%COMP%]{font-size:.65625rem!important}.font-size-s-1[_ngcontent-%COMP%]{font-size:.6875rem!important}.font-size-s-2[_ngcontent-%COMP%]{font-size:.75rem!important}.font-size-s-3[_ngcontent-%COMP%]{font-size:.875rem!important}.font-size-s-4[_ngcontent-%COMP%]{font-size:.8125rem!important}.font-size-m[_ngcontent-%COMP%]{font-size:1rem!important}.font-size-m-1[_ngcontent-%COMP%]{font-size:1.125rem!important}.font-size-m-2[_ngcontent-%COMP%]{font-size:1.25rem!important}.font-size-m-3[_ngcontent-%COMP%]{font-size:1.375rem!important}.font-size-l[_ngcontent-%COMP%]{font-size:1.5rem!important}.font-size-l-1[_ngcontent-%COMP%]{font-size:1.625rem!important}.font-size-l-2[_ngcontent-%COMP%]{font-size:2.125rem!important}.font-size-l-3[_ngcontent-%COMP%]{font-size:2.375rem!important}.font-size-xl[_ngcontent-%COMP%]{font-size:2.5rem!important}.row-details-header[_ngcontent-%COMP%]{margin:0 0 .75rem}.row-detail-title[_ngcontent-%COMP%]{font-weight:font-weight("Bold")}.row-detail-details[_ngcontent-%COMP%] > p[_ngcontent-%COMP%]{line-height:1.5;margin:0}'],changeDetection:0})}}return t})();function qt(t,a){if(t&1&&f(0,"ppg-import-history-row-details",9),t&2){let e=a.row;u("rowDetails",e.importSummaryDetails)("status",e.status)}}function Zt(t,a){if(t&1&&(l(0,"div",10),d(1),c()),t&2){let e=a.cell;p(),M(" ",e," ")}}function te(t,a){if(t&1&&(l(0,"span"),d(1),s(2,"transloco"),s(3,"date"),c()),t&2){let e=a.cell;p(),h(N(3,3,e,m(2,1,"DATETIME_FORMAT")))}}function ee(t,a){if(t&1&&(l(0,"div",10),d(1),c()),t&2){let e=a.cell;p(),M(" ",e," ")}}function ie(t,a){t&1&&(l(0,"span",12),s(1,"transloco"),d(2),s(3,"transloco"),c()),t&2&&(_("title",m(1,2,"ADMIN.BULK_IMPORT.EXPAND_ERROR_TIP")),p(2),M(" ",m(3,4,"ADMIN.BULK_IMPORT.STATUSES.NEW")," "))}function ne(t,a){t&1&&(f(0,"p-tag",13),s(1,"transloco")),t&2&&_("value",m(1,1,"ADMIN.BULK_IMPORT.STATUSES.IN_PROGRESS"))}function oe(t,a){t&1&&(f(0,"p-tag",14),s(1,"transloco")),t&2&&_("value",m(1,1,"ADMIN.BULK_IMPORT.STATUSES.COMPLETED"))}function re(t,a){t&1&&(f(0,"p-tag",15),s(1,"transloco")),t&2&&_("value",m(1,1,"ADMIN.BULK_IMPORT.STATUSES.ERROR"))}function ae(t,a){if(t&1&&(l(0,"div",11),g(1,ie,4,6,"span",12)(2,ne,2,3,"p-tag",13)(3,oe,2,3,"p-tag",14)(4,re,2,3,"p-tag",15),c()),t&2){let e,i=a.cell;p(),T((e=i)==="New"?1:e==="InProgress"?2:e==="Completed"?3:e==="Error"?4:-1)}}var pe=3e4,F=(()=>{class t extends bt{#t;#e;constructor(e,i){super(i),this.bulkImportService=e,this.#t=O(tt),this.#e=O(Pt),this.rowExpandPredicate=n=>n.status!==z[z.New],this.#e.observePrimeNgBreakpoint(j.Notebook).pipe(V(this.#t)).subscribe(n=>{this.isDesktopOrNotebook=!n})}ngOnInit(){this.isSmallPhoneView$=this.#e.observePrimeNgBreakpoint(j.Phone),this.tableDataFacade.updateSource(e=>this.bulkImportService.getImportHistory(e)),Y(pe).pipe(V(this.#t)).subscribe(()=>this.tableDataFacade.refreshSourceData())}refresh(){this.tableDataFacade.refreshSourceData()}static{this.\u0275fac=function(i){return new(i||t)(x(A),x(B))}}static{this.\u0275cmp=P({type:t,selectors:[["app-import-history"]],standalone:!1,features:[lt([B]
2),it],decls:23,vars:30,consts:[[1,"mb-4"],["dataKey","id",3,"pageSizeChange","pageNumberChange","paginatorPhoneVersion","data","isDesktopView","loading","rowExpandPredicate"],["ppgTemplate",""],["field","id",3,"title"],["field","fileName",3,"title"],["appColumnTemplate",""],["field","createdOn",3,"title"],["field","createdBy",3,"title"],["field","status",3,"title","isViewDetailsColumn"],[3,"rowDetails","status"],[1,"u-overflow-wrap-anywhere"],[1,"flex","align-items-center","pt-2","lg:pt-0"],["data-test-id","importHistory.newTag",3,"title"],["data-test-id","importHistory.inProgressTag","icon","pi pi-clock","severity","info",3,"value"],["data-test-id","importHistory.completedTag","icon","pi pi-check-circle","severity","success",3,"value"],["data-test-id","importHistory.errorTag","icon","pi pi-exclamation-circle","severity","danger",3,"value"]],template:function(i,n){i&1&&(l(0,"h1",0),d(1),s(2,"transloco"),c(),l(3,"ppg-table",1),s(4,"async"),s(5,"async"),s(6,"async"),w("pageSizeChange",function(r){return n.pageSizeHandler(r)})("pageNumberChange",function(r){return n.changePageHandler(r)}),l(7,"ppg-table-row-details"),g(8,qt,1,2,"ng-template",2),c(),f(9,"ppg-table-column",3),s(10,"transloco"),l(11,"ppg-table-column",4),s(12,"transloco"),g(13,Zt,2,1,"ng-template",5),c(),l(14,"ppg-table-column",6),s(15,"transloco"),g(16,te,4,6,"ng-template",5),c(),l(17,"ppg-table-column",7),s(18,"transloco"),g(19,ee,2,1,"ng-template",5),c(),l(20,"ppg-table-column",8),s(21,"transloco"),g(22,ae,5,1,"ng-template",5),c()()),i&2&&(p(),h(m(2,12,"ADMIN.BULK_IMPORT.BULK_IMPORT_HISTORY")),p(2),u("paginatorPhoneVersion",m(4,14,n.isSmallPhoneView$))("data",m(5,16,n.data$))("isDesktopView",n.isDesktopOrNotebook)("loading",m(6,18,n.loading$))("rowExpandPredicate",n.rowExpandPredicate),p(6),_("title",m(10,20,"ADMIN.BULK_IMPORT.TABLE_COLUMN.ID")),p(2),_("title",m(12,22,"ADMIN.BULK_IMPORT.TABLE_COLUMN.FILE")),p(3),_("title",m(15,24,"ADMIN.BULK_IMPORT.TABLE_COLUMN.IMPORT_DATE")),p(3),_("title",m(18,26,"ADMIN.BULK_IMPORT.TABLE_COLUMN.UPLOADED_BY")),p(3),_("title",m(21,28,"ADMIN.BULK_IMPORT.TABLE_COLUMN.STATUS")),u("isViewDetailsColumn",!0))},dependencies:[wt,Nt,Bt,Dt,Rt,St,Ut,v,dt,gt],encapsulation:2})}}return t})();var Lt=t=>[t],le=t=>({label:t,routerLink:"/"}),me=t=>({label:t}),ce=(t,a)=>[t,a];function de(t,a){t&1&&(f(0,"ppg-cdp-breadcrumbs",3),s(1,"transloco"),s(2,"transloco")),t&2&&u("model",mt(9,ce,E(5,le,m(1,1,"NAV.HOME")),E(7,me,m(2,3,"NAV.BULK_IMPORT"))))}function ge(t,a){if(t&1){let e=rt();l(0,"ppg-upload-files",4),w("uploadExcelFile",function(n){q(e);let o=C();return Z(o.uploadExcelFile(n))}),c()}if(t&2){let e=C();u("resources",e.uploadFilesResources())}}function ue(t,a){if(t&1&&(l(0,"a",5),f(1,"span",6),d(2),s(3,"transloco"),c()),t&2){let e=C();u("href",e.relativeExcelTemplateUrl,et),p(2),M(" ",m(3,2,"ADMIN.BULK_IMPORT.DOWNLOAD_TEMPLATE"),`
3`)}}var Ht=(()=>{class t{#t;constructor(e){this.bulkImportService=e,this.#t=O(Et),this.relativeExcelTemplateUrl="/assets/documents/admin/excel-import/exceltemplate.xlsx",this.permissions=Tt,this.uploadFilesResources=ct(()=>({closeAriaLabel:this.#t.getResourceByKey(Ct.A11Y_CLOSE)}))}uploadExcelFile(e){this.bulkImportService.uploadExcel(e).subscribe(()=>{this.importHistoryCmp?.refresh()})}static{this.\u0275fac=function(i){return new(i||t)(x(A))}}static{this.\u0275cmp=P({type:t,selectors:[["app-bulk-import"]],viewQuery:function(i,n){if(i&1&&at(F,5),i&2){let o;pt(o=st())&&(n.importHistoryCmp=o.first)}},standalone:!1,decls:4,vars:6,consts:[[3,"model",4,"ppgHideOnMobileAppView"],[3,"resources","uploadExcelFile",4,"ngxPermissionsOnly"],["class","no-underline font-bold mb-4 p-button p-button-link w-full justify-content-center",3,"href",4,"ngxPermissionsOnly"],[3,"model"],[3,"uploadExcelFile","resources"],[1,"no-underline","font-bold","mb-4","p-button","p-button-link","w-full","justify-content-center",3,"href"],[1,"pi","pi-file","mr-2"]],template:function(i,n){i&1&&(g(0,de,3,12,"ppg-cdp-breadcrumbs",0)(1,ge,1,1,"ppg-upload-files",1)(2,ue,4,4,"a",2),f(3,"app-import-history")),i&2&&(p(),u("ngxPermissionsOnly",E(2,Lt,n.permissions.MANAGE_IMPORTS)),p(),u("ngxPermissionsOnly",E(4,Lt,n.permissions.VIEW_IMPORTS)))},dependencies:[ht,xt,zt,yt,F,v],encapsulation:2})}}return t})();var fe=[{path:"",component:Ht}],Vt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=D({type:t})}static{this.\u0275inj=R({imports:[K.forChild(fe),K]})}}return t})();var yi=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=D({type:t})}static{this.\u0275inj=R({imports:[At,ut,Vt,Ot]})}}return t})();export{yi as BulkImportModule};

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.