mirror of
https://github.com/openMF/web-app.git
synced 2026-02-06 14:26:45 +00:00
2 lines
13 KiB
JavaScript
2 lines
13 KiB
JavaScript
import{C as y,G as o,J as v,K as u,Kc as C,Nb as a,Qb as h,R as b,Tc as l,b as f}from"./chunk-WLMTCWWK.js";import{a as m,b as g}from"./chunk-PHUH23IY.js";var D=(()=>{class s{constructor(t){this.translateService=t}translate(t,e){return this.translateService.get(t,e)}static{this.\u0275fac=function(e){return new(e||s)(v(C))}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac})}}return s})();function j(s){s||(s=u(b));let P=new f(t=>{if(s.destroyed){t.next();return}return s.onDestroy(t.next.bind(t))});return t=>t.pipe(y(P))}var q=(()=>{class s{constructor(){this.settingsService=u(l),this.globalConfigurations=[s.DAYS_BEFORE_REPAYMENT_IS_DUE,s.DAYS_AFTER_REPAYMENT_IS_OVERDUE],this.propertyNames=["dueDaysForRepaymentEvent","overDueDaysForRepaymentEvent"]}static{this.LOAN_SCHEDULE_TYPE_CUMULATIVE="CUMULATIVE"}static{this.LOAN_SCHEDULE_TYPE_PROGRESSIVE="PROGRESSIVE"}static{this.LOAN_SCHEDULE_PROCESSING_TYPE_HORIZONTAL="HORIZONTAL"}static{this.LOAN_SCHEDULE_PROCESSING_TYPE_VERTICAL="VERTICAL"}static{this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY="advanced-payment-allocation-strategy"}static{this.DAYS_BEFORE_REPAYMENT_IS_DUE="days-before-repayment-is-due"}static{this.DAYS_AFTER_REPAYMENT_IS_OVERDUE="days-after-repayment-is-overdue"}static isAdvancedPaymentAllocationStrategy(t){return t===this.ADVANCED_PAYMENT_ALLOCATION_STRATEGY}setItemsByDefault(t){let e=[];return t.globalConfiguration.forEach(r=>{this.globalConfigurations.includes(r.name)&&e.push(r)}),e}updateLoanProductDefaults(t,e){return t.itemsByDefault.forEach(n=>{let i=this.resolvePropertyName(n.name);i!==""&&(e?(!t[i]||t[i]==="")&&(t[i]=n.value):t[i]=n.value)}),t}buildPayload(t,e){let r=this.settingsService.dateFormat,n=this.settingsService.language.code,i=g(m({},t),{charges:t.charges.map(p=>({id:p.id})),dateFormat:r,locale:n});return delete i.allowAttributeConfiguration,delete i.advancedAccountingRules,i.allowPartialPeriodInterestCalculation=i.allowPartialPeriodInterestCalculation,delete i.allowPartialPeriodInterestCalculation,e.forEach(p=>{let c=this.resolvePropertyName(p.name);c!==""&&(!i[c]||i[c]==="")&&(i[c]=p.value)}),i}isItemByDefault(t){return this.propertyNames.includes(t)}isGlobalConfigurations(t){return this.globalConfigurations.includes(t)}resolvePropertyName(t){if(this.globalConfigurations.includes(t)){let e=this.globalConfigurations.indexOf(t);if(e>-1)return this.propertyNames[e]}return""}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var Q=(()=>{class s{constructor(){this.http=u(h),this.basePath="/external-asset-owners"}executeExternalAssetOwnerLoanCommand(t,e,r){let n=new a().set("command",r);return this.http.post(`${this.basePath}/transfers/loans/${t}`,e,{params:n})}executeExternalAssetOwnerTransferCommand(t,e,r){let n=new a().set("command",r);return this.http.post(`${this.basePath}/transfers/${t}`,e,{params:n})}retrieveExternalAssetOwnerTransfers(t){let e=new a().set("loanId",t);return this.http.get(`${this.basePath}/transfers`,{params:e})}retrieveExternalAssetOwnerActiveTransfer(t){let e=new a().set("loanId",t);return this.http.get(`${this.basePath}/transfers/active-transfer`,{params:e})}retrieveExternalAssetOwnerTransferJournalEntries(t){return this.http.get(`${this.basePath}/transfers/${t}/journal-entries`)}searchExternalAssetOwnerTransfer(t){return this.http.post(`${this.basePath}/search`,t)}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var X=(()=>{class s{constructor(){this.http=u(h),this.settingsService=u(l)}getProvisioningCriterias(){return this.http.get("/provisioningcriteria")}getProvisioningCriteriaTemplate(){return this.http.get("/provisioningcriteria/template")}getProvisioningCriteria(t,e=!1){let r=new a().set("template",e.toString());return this.http.get(`/provisioningcriteria/${t}`,{params:r})}createProvisioningCriteria(t){return this.http.post("/provisioningcriteria",t)}updateProvisioningCriteria(t,e){return this.http.put(`/provisioningcriteria/${t}`,e)}deleteProvisioningCriteria(t){return this.http.delete(`/provisioningcriteria/${t}`)}getOffices(){return this.http.get("/offices")}getOfficeTemplate(t){let e=new a().set("officeId",t.toString());return this.http.get("/loans/loanreassignment/template",{params:e})}getOfficerTemplate(t,e){let r=new a().set("fromLoanOfficerId",t.toString()).set("officeId",e.toString());return this.http.get("/loans/loanreassignment/template",{params:r})}createLoanReassignment(t){return this.http.post("/loans/loanreassignment",t)}getOffice(t,e=!1){let r=new a().set("template",e.toString());return this.http.get(`/offices/${t}`,{params:r})}createOffice(t){return this.http.post("/offices",t)}updateOffice(t,e){return this.http.put(`/offices/${t}`,e)}getOfficeDatatables(){let t=new a().set("apptable","m_office");return this.http.get("/datatables",{params:t})}getOfficeDatatable(t,e){let r=new a().set("genericResultSet","true");return this.http.get(`/datatables/${e}/${t}`,{params:r})}addOfficeDatatableEntry(t,e,r){let n=new a().set("genericResultSet","true");return this.http.post(`/datatables/${e}/${t}`,r,{params:n})}editOfficeDatatableEntry(t,e,r){let n=new a().set("genericResultSet","true");return this.http.put(`/datatables/${e}/${t}`,r,{params:n})}deleteDatatableContent(t,e){let r=new a().set("genericResultSet","true");return this.http.delete(`/datatables/${e}/${t}`,{params:r})}getEmployees(){let t=new a().set("status","all");return this.http.get("/staff",{params:t})}createEmployee(t){return this.http.post("/staff",t)}getEmployee(t,e=!0){let r=new a().set("template",e.toString());return this.http.get(`/staff/${t}`,{params:r})}getCurrencies(){return this.http.get("/currencies")}updateCurrencies(t){return this.http.put("/currencies",{currencies:t})}getSmsCampaigns(){return this.http.get("/smscampaigns")}getSmsCampaign(t){return this.http.get(`/smscampaigns/${t}`)}createSmsCampaign(t){return this.http.post("/smscampaigns",t)}updateSmsCampaign(t,e){return this.http.put(`/smscampaigns/${e}`,t)}deleteSmsCampaign(t){return this.http.delete(`/smscampaigns/${t}`)}getSmsCampaignTemplate(){return this.http.get("/smscampaigns/template")}executeSmsCampaignCommand(t,e,r){let n=new a().set("command",r.toString());return this.http.post(`/smscampaigns/${t}`,e,{params:n})}getMessagebyStatus(t){let e=new a().set("status",t.status.toString()).set("locale",t.locale).set("dateFormat",t.dateFormat);return e=t.fromDate?e.set("fromDate",t.fromDate):e,e=t.toDate?e.set("toDate",t.toDate):e,this.http.get(`/sms/${t.id}/messageByStatus`,{params:e})}getAdhocQueries(){return this.http.get("/adhocquery")}getAdhocQuery(t){return this.http.get(`/adhocquery/${t}`)}getAdhocQueryTemplate(){return this.http.get("/adhocquery/template")}getAdhocQueryAndTemplate(t){let e=new a().set("template","true");return this.http.get(`/adhocquery/${t}`,{params:e})}createAdhocQuery(t){return this.http.post("/adhocquery",t)}updateAdhocQuery(t,e){return this.http.put(`/adhocquery/${t}`,e)}deleteAdhocQuery(t){return this.http.delete(`/adhocquery/${t}`)}getTellers(){return this.http.get("/tellers")}getTeller(t){return this.http.get(`/tellers/${t}`)}getCashiers(t){return this.http.get(`/tellers/${t}/cashiers`)}getCashier(t,e){return this.http.get(`/tellers/${t}/cashiers/${e}`)}getCashierSummaryAndTransactions(t,e,r){let n=new a().set("currencyCode",r);return this.http.get(`/tellers/${t}/cashiers/${e}/summaryandtransactions`,{params:n})}getCashierTransactionTemplate(t,e){return this.http.get(`/tellers/${t}/cashiers/${e}/transactions/template`)}createCashier(t,e){return this.http.post(`/tellers/${t}/cashiers`,e)}deleteCashier(t,e){return this.http.delete(`/tellers/${t}/cashiers/${e}`)}settleCash(t,e,r){let n=new a().set("command","settle");return this.http.post(`/tellers/${t}/cashiers/${e}/settle`,r,{params:n})}allocateCash(t,e,r){let n=new a().set("command","allocate");return this.http.post(`/tellers/${t}/cashiers/${e}/allocate`,r,{params:n})}getCashierTemplate(t){return this.http.get(`/tellers/${t}/cashiers/template`)}updateCashier(t,e,r){return this.http.put(`/tellers/${t}/cashiers/${e}`,r)}deleteTeller(t){return this.http.delete(`/tellers/${t}`)}createTeller(t){return this.http.post("/tellers",t)}getPaymentTypes(){return this.http.get("/paymenttypes")}getPaymentTypesWithCode(){return this.http.get("/paymenttypes?onlyWithCode=true")}createPaymentType(t){return this.http.post("/paymenttypes",t)}deletePaymentType(t){return this.http.delete(`/paymenttypes/${t}`)}getPaymentType(t){return this.http.get(`/paymenttypes/${t}`)}updatePaymentType(t,e){return this.http.put(`/paymenttypes/${t}`,e)}getPasswordPreferencesTemplate(){return this.http.get("/passwordpreferences/template")}updatePasswordPreferences(t){return this.http.put("/passwordpreferences",t)}getEntityDataTableChecks(t=0,e=-1){let r=new a().set("offset",t.toString()).set("limit",e.toString());return this.http.get("/entityDatatableChecks",{params:r})}getEntityDataTableChecksTemplate(){return this.http.get("/entityDatatableChecks/template")}createEntityDataTableChecks(t){return this.http.post("/entityDatatableChecks",t)}deleteEntityDataTableCheck(t){return this.http.delete(`/entityDatatableChecks/${t}`)}getWorkingDays(){return this.http.get("/workingdays")}updateWorkingDays(t){return this.http.put("/workingdays",t)}getHolidays(t){let e=new a().set("officeId",t.toString());return this.http.get("/holidays",{params:e})}getHoliday(t){return this.http.get(`/holidays/${t}`)}getHolidayTemplate(){return this.http.get("/holidays/template")}createHoliday(t){return this.http.post("/holidays",t)}updateHoliday(t,e){return this.http.put(`/holidays/${t}`,e)}deleteHoliday(t){return this.http.delete(`/holidays/${t}`)}activateHoliday(t){let e=new a().set("command","activate");return this.http.post(`/holidays/${t}`,null,{params:e})}updateEmployee(t,e){return this.http.put(`/staff/${t}`,e)}updateTeller(t,e){return this.http.put(`/tellers/${t}`,e)}getFunds(){return this.http.get("/funds")}getFund(t){return this.http.get(`/funds/${t}`)}createFund(t){return this.http.post("/funds",t)}editFund(t,e){return this.http.put(`/funds/${t}`,e)}getStaffs(t){let e=new a().set("officeId",t).set("status","all");return this.http.get("/staff",{params:e})}getCenters(t){let e=new a().set("officeId",t).set("status","all");return this.http.get("/centers",{params:e})}getGroups(t){let e=new a().set("officeId",t).set("status","all");return this.http.get("/groups",{params:e})}getStaff(t){let e=new a().set("officeId",t.toString());return this.http.get("/staff",{params:e})}getImports(t){let e=new a().set("entityType",t);return this.http.get("/imports",{params:e})}getAdvanceSearchTemplate(){return this.http.get("/search/template")}retrieveAdvanceSearchResults(t){return this.http.post("/search/advance",t)}getStandingInstructionTemplate(){return this.http.get("/standinginstructions/template")}getStandingInstructions(t){let e=new a;for(let r in t)t[r]!==""&&t[r]!==null&&(e=e.set(r,t[r]));return this.http.get("/standinginstructionrunhistory",{params:e})}getImportTemplate(t,e,r,n){let i=new a().set("tenantIdentifier","default").set("locale",this.settingsService.language.code).set("dateFormat",this.settingsService.dateFormat);return e&&(i=i.set("officeId",e.toString())),r&&(i=i.set("staffId",r.toString())),n.length&&(i=i.set("legalFormType",n)),this.http.get(`${t}/downloadtemplate`,{params:i,responseType:"arraybuffer",observe:"response"})}getImportDocument(t){let e=new a().set("importDocumentId",t).set("tenantIdentifier","default");return this.http.get("/imports/downloadOutputTemplate",{params:e,responseType:"arraybuffer",observe:"response"})}uploadImportDocument(t,e,r){let n=new a;r.length&&(n=n.set("legalFormType",r));let i=new FormData;return i.append("file",t),i.append("locale",this.settingsService.language.code),i.append("dateFormat",this.settingsService.dateFormat),this.http.post(`${e}/uploadtemplate`,i,{params:n})}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();var et=(()=>{class s{constructor(){this.defaultDate="9999-12-31"}validateStatus(t,e){return t!=null?t.status===e:!1}itemCurrentStatus(t){return this.isBuyBackPending(t)?t.status+" PENDING":t.status}itemStatus(t){return"status-"+t.toLowerCase()}isPending(t){return t.status==="PENDING"}isPendingOrCanceled(t){return t.status==="PENDING"||t.status==="CANCELLED"||this.isBuyBackPending(t)}isBuyBackPending(t){return t.status==="BUYBACK"&&t.effectiveTo===this.defaultDate}canBeCancelled(t){return this.validateStatus(t,"PENDING")}canBeSold(t){return t==null?!0:["","CANCELLED"].includes(t.status)||t.status==="BUYBACK"&&t.effectiveTo!==this.defaultDate}canBeBuyed(t){return this.validateStatus(t,"ACTIVE")}static{this.\u0275fac=function(e){return new(e||s)}}static{this.\u0275prov=o({token:s,factory:s.\u0275fac,providedIn:"root"})}}return s})();export{D as a,j as b,q as c,Q as d,X as e,et as f};
|