PageSourceSearch

https://oneanchor.ai/3311.4e97a429ef0ed3d2.js

js oneanchor.ai collected 2026-10-05 12:24:37 UTC 31,143 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3311],{93311(M,T,c){c.d(T,{WorkflowSettingsPage:()=>ht});var i=c(87018),x=c(72151),k=c(19913),I=c(81421),g=c(88683),_=c(71604),F=c(50170),m=c(84709);const w=["PROCESSOR","APPROVER","AUTHORIZED_SIGNATORY"],v=["PRESIDENT","SECRETARY","TREASURER"],E={GT:"above",GTE:"at least",LT:"below",LTE:"at most",EQ:"is",NEQ:"is not",IN:"is one of"};function S(n,r){if(!n)return null;switch(n.type){case"ROLE":return`Role ${n.role??""}${n.departmentScoped?" in the document department":""}`.trim();case"DESIGNATION":return`Designation ${n.designation??""}`.trim();case"PARAM":return`Role from setting ${r.find(e=>e.key===n.param)?.label??n.param??""}`.trim();default:return null}}function O(n){return n?`${n.field} ${E[n.operator]??n.operator} ${n.value}`:null}function y(n){const r={};for(const o of n.params??[])r[o.key]=o.defaultValue??"";return r}let $=(()=>{var n;class r{constructor(e){this.http=e,this.base=`${F.c.requisitionBase}/api/workflow`}getSettings(){return this.http.get(`${this.base}/settings`)}updateSettings(e,s){return this.http.put(`${this.base}/settings/${e}`,s)}getTemplates(e){const s=(new _.Nl).set("documentType",e);return this.http.get(`${this.base}/templates`,{params:s})}static#t=n=()=>(this.\u0275fac=function(s){return new(s||r)(m.KVO(_.Qq))},this.\u0275prov=m.jDH({token:r,factory:r.\u0275fac,providedIn:"root"}))}return n(),r})();var P=c(93307),C=c(91087),t=c(92958),u=c(30949),p=c(32725);
1function f(n,r){1&n&&(t.j41(0,"div",17),t.nrm(1,"ion-spinner",18),t.k0s())}function d(n,r){1&n&&(t.j41(0,"div",19),t.EFF(1," Workflow settings could not be loaded. Try refreshing the page. "),t.k0s())}function h(n,r){1&n&&(t.j41(0,"div",20),t.EFF(1," No workflow settings are available for this organisation yet. "),t.k0s())}function R(n,r){1&n&&(t.j41(0,"span",48),t.EFF(1,"Not saved"),t.k0s())}function D(n,r){if(1&n&&(t.qex(0),t.j41(1,"span",49),t.EFF(2,"|"),t.k0s(),t.EFF(3),t.bVm()),2&n){const o=r.ngIf;t.R7$(3),t.SpI(" ",o)}}function N(n,r){if(1&n){const o=t.RV6();t.j41(0,"button",50),t.bIt("click",function(){m.eBV(o);const s=t.XpG().$implicit,a=t.XpG();return m.Njj(a.toggleTemplates(s))}),t.nrm(1,"ion-icon",51),t.EFF(2),t.k0s()}if(2&n){const o=t.XpG().$implicit;t.BMQ("data-testid","change-template-"+o.dto.documentType),t.R7$(2),t.SpI(" ",o.showTemplates?"Hide templates":"Change template"," ")}}function B(n,r){1&n&&(t.j41(0,"div",57),t.nrm(1,"ion-spinner",58),t.EFF(2," Loading templates "),t.k0s())}function W(n,r){if(1&n){const o=t.RV6();t.j41(0,"app-dropdown",60),t.bIt("ngModelChange",function(s){m.eBV(o);const a=t.XpG(3).$implicit,l=t.XpG();return m.Njj(l.selectTemplate(a,s))}),t.k0s()}if(2&n){const o=t.XpG(3).$implicit,e=t.XpG();t.Y8G("options",e.templateOptions(o))("ngModel",e.selectedTemplateId(o))}}function Y(n,r){1&n&&(t.j41(0,"p",61),t.EFF(1,"No other templates are available for this document type."),t.k0s())}function X(n,r){if(1&n&&(t.qex(0),t.DNE(1,W,1,2,"app-dropdown",59)(2,Y,2,0,"p",44),t.bVm()),2&n){const o=t.XpG(2).$implicit;t.R7$(),t.Y8G("ngIf",o.templates.length>0),t.R7$(),t.Y8G("ngIf",0===o.templates.length)}}function L(n,r){if(1&n&&(t.j41(0,"p",62),t.EFF(1),t.k0s()),2&n){const o=t.XpG(2).$implicit;t.R7$(),t.JRh(o.definition.description)}}function A(n,r){if(1&n&&(t.j41(0,"div",52)(1,"label",53),t.EFF(2,"Template"),t.k0s(),t.DNE(3,B,3,0,"div",54)(4,X,3,2,"ng-container",36)(5,L,2,1,"p",55),t.j41(6,"p",56),t.EFF(7,"Switching templates resets the settings below to that template's defaults."),t.k0s()()),2&n){const o=t.XpG().$implicit;t.R7$(3),t.Y8G("ngIf",o.templatesLoading),t.R7$(),t.Y8G("ngIf",!o.templatesLoading),t.R7$(),t.Y8G("ngIf",o.definition.description)}}function V(n,r){if(1&n&&(t.j41(0,"span"),t.EFF(1),t.k0s()),2&n){const o=t.XpG().index;t.R7$(),t.JRh(o+1)}}function U(n,r){1&n&&t.nrm(0,"ion-icon",73)}function Q(n,r){1&n&&(t.j41(0,"span",74),t.EFF(1,"Notification"),t.k0s())}function K(n,r){if(1&n&&(t.j41(0,"span",75),t.EFF(1),t.k0s()),2&n){const o=t.XpG().$implicit;t.R7$(),t.SpI(" ",o.requiredSignatures," signatures ")}}function H(n,r){if(1&n&&(t.j41(0,"p",35),t.EFF(1),t.k0s()),2&n){const o=t.XpG().$implicit;t.R7$(),t.JRh(o.selectorSummary)}}function z(n,r){if(1&n&&(t.j41(0,"p",76),t.EFF(1),t.k0s()),2&n){const o=t.XpG().$implicit;t.R7$(),t.SpI("Only when ",o.conditionSummary)}}function J(n,r){if(1&n&&(t.j41(0,"li",63)(1,"div",64),t.DNE(2,V,2,1,"span",36)(3,U,1,0,"ion-icon",65),t.k0s(),t.j41(4,"div",66)(5,"div",67)(6,"span",68),t.EFF(7),t.k0s(),t.DNE(8,Q,2,0,"span",69)(9,K,2,1,"span",70),t.k0s(),t.DNE(10,H,2,1,"p",71)(11,z,2,1,"p",72),t.k0s()()),2&n){const o=r.$implicit;t.R7$(),t.Y8G("ngClass","NOTIFY"===o.type?"workflow-step__marker--notify":"workflow-step__marker--approval"),t.R7$(),t.Y8G("ngIf","NOTIFY"!==o.type),t.R7$(),t.Y8G("ngIf","NOTIFY"===o.type),t.R7$(4),t.JRh(o.name),t.R7$(),t.Y8G("ngIf","NOTIFY"===o.type),t.R7$(),t.Y8G("ngIf","APPROVAL"===o.type&&o.requiredSignatures&&o.requiredSignatures>1),t.R7$(),t.Y8G("ngIf",o.selectorSummary),t.R7$(),t.Y8G("ngIf",o.conditionSummary)}}function q(n,r){1&n&&(t.j41(0,"p",61),t.EFF(1,"This template has no settings to fill in."),t.k0s())}function Z(n,r){if(1&n){const o=t.RV6();t.j41(0,"app-dropdown",84),t.bIt("ngModelChange",function(s){m.eBV(o);const a=t.XpG(2).$implicit,l=t.XpG(2).$implicit,b=t.XpG();return m.Njj(b.onParamChange(l,a.key,s))}),t.k0s()}if(2&n){const o=t.XpG(2).$implicit,e=t.XpG(2).$implicit,s=t.XpG();t.Y8G("options",s.paramOptions(o))("ngModel",e.form[o.key])("placeholder","Choose "+("ROLE"===o.type?"a role":"a designation"))}}function tt(n,r){if(1&n&&(t.j41(0,"p",85),t.EFF(1),t.k0s()),2&n){const o=t.XpG(2).$implicit,e=t.XpG(2).$implicit,s=t.XpG();t.R7$(),t.JRh(s.humanise(e.form[o.key])||"Not set")}}function et(n,r){if(1&n&&(t.qex(0),t.DNE(1,Z,1,3,"app-dropdown",82)(2,tt,2,1,"p",83),t.bVm()),2&n){const o=t.XpG(3).$implicit;t.R7$(),t.Y8G("ngIf",o.dto.editable),t.R7$(),t.Y8G("ngIf",!o.dto.editable)}}function nt(n,r){if(1&n){const o=t.RV6();t.j41(0,"input",87),t.bIt("ngModelChange",function(s){m.eBV(o);const a=t.XpG(2).$implicit,l=t.XpG(2).$implicit,b=t.XpG();return m.Njj(b.onParamChange(l,a.key,s))}),t.k0s()}if(2&n){const o=t.XpG(2).$implicit,e=t.XpG(2).$implicit;t.Y8G("id","param-"+e.dto.documentType+"-"+o.key)("type","NUMBER"===o.type?"number":"text")("ngModel",e.form[o.key]),t.BMQ("data-testid","param-"+e.dto.documentType+"-"+o.key)}}function ot(n,r){if(1&n&&(t.j41(0,"p",85),t.EFF(1),t.k0s()),2&n){const o=t.XpG(2).$implicit,e=t.XpG(2).$implicit;t.R7$(),t.JRh(e.form[o.key]||"Not set")}}function it(n,r){if(1&n&&t.DNE(0,nt,1,4,"input",86)(1,ot,2,1,"p",83),2&n){const o=t.XpG(3).$implicit;t.Y8G("ngIf",o.dto.editable),t.R7$(),t.Y8G("ngIf",!o.dto.editable)}}function st(n,r){if(1&n&&(t.j41(0,"div",79)(1,"label",80),t.EFF(2),t.k0s(),t.DNE(3,et,3,2,"ng-container",81)(4,it,2,2,"ng-template",null,0,t.C5r),t.k0s()),2&n){const o=r.$implicit,e=t.sdS(5),s=t.XpG(2).$implicit,a=t.XpG();t.R7$(),t.BMQ("for","param-"+s.dto.documentType+"-"+o.key),t.R7$(),t.JRh(o.label),t.R7$(),t.Y8G("ngIf",a.isSelectParam(o))("ngIfElse",e)}}function rt(n,r){if(1&n&&(t.j41(0,"div",77),t.DNE(1,st,6,4,"div",78),t.k0s()),2&n){const o=t.XpG().$implicit,e=t.XpG();t.R7$(),t.Y8G("ngForOf",o.definition.params)("ngForTrackBy",e.trackByKey)}}function at(n,r){1&n&&(t.j41(0,"p",88),t.nrm(1,"ion-icon",89),t.EFF(2," Only an Authorized Signatory can change this workflow. "),t.k0s())}function lt(n,r){1&n&&(t.qex(0),t.EFF(1,"Fill in every setting to save."),t.bVm())}function ct(n,r){1&n&&(t.qex(0),t.EFF(1,"No unsaved changes."),t.bVm())}function pt(n,r){1&n&&(t.qex(0),t.EFF(1,"Changes apply to new requests only."),t.bVm())}function dt(n,r){if(1&n){const o=t.RV6();t.j41(0,"button",95),t.bIt("click",function(){m.eBV(o);const s=t.XpG(2).$implicit,a=t.XpG();return m.Njj(a.discard(s))}),t.nrm(1,"ion-icon",96),t.EFF(2," Discard "),t.k0s()}if(2&n){const o=t.XpG(2).$implicit;t.Y8G("disabled",o.saving)}}
1function mt(n,r){1&n&&t.nrm(0,"ion-spinner",58)}function ft(n,r){1&n&&t.nrm(0,"ion-icon",97)}function _t(n,r){if(1&n){const o=t.RV6();t.qex(0),t.j41(1,"p",61),t.DNE(2,lt,2,0,"ng-container",36)(3,ct,2,0,"ng-container",36)(4,pt,2,0,"ng-container",36),t.k0s(),t.j41(5,"div",90),t.DNE(6,dt,3,1,"button",91),t.j41(7,"button",92),t.bIt("click",function(){m.eBV(o);const s=t.XpG().$implicit,a=t.XpG();return m.Njj(a.save(s))}),t.DNE(8,mt,1,0,"ion-spinner",93)(9,ft,1,0,"ion-icon",94),t.EFF(10),t.k0s()(),t.bVm()}if(2&n){const o=t.XpG().$implicit,e=t.XpG();t.R7$(2),t.Y8G("ngIf",!e.isComplete(o)),t.R7$(),t.Y8G("ngIf",e.isComplete(o)&&!e.isDirty(o)),t.R7$(),t.Y8G("ngIf",e.isComplete(o)&&e.isDirty(o)),t.R7$(2),t.Y8G("ngIf",e.isDirty(o)),t.R7$(),t.Y8G("disabled",o.saving||!e.isDirty(o)||!e.isComplete(o)),t.BMQ("data-testid","save-workflow-"+o.dto.documentType),t.R7$(),t.Y8G("ngIf",o.saving),t.R7$(),t.Y8G("ngIf",!o.saving),t.R7$(),t.SpI(" ",o.saving?"Saving":"Save"," ")}}function gt(n,r){if(1&n&&(t.j41(0,"section",21)(1,"div",22)(2,"div",23)(3,"div",24)(4,"h2",25),t.EFF(5),t.k0s(),t.j41(6,"p",26),t.EFF(7),t.k0s()(),t.j41(8,"span",27),t.EFF(9),t.k0s()(),t.j41(10,"div",28)(11,"div",29)(12,"div",30),t.nrm(13,"ion-icon",31),t.k0s(),t.j41(14,"div",24)(15,"p",32),t.EFF(16),t.j41(17,"span",33),t.EFF(18),t.k0s(),t.DNE(19,R,2,0,"span",34),t.k0s(),t.j41(20,"p",35),t.EFF(21),t.DNE(22,D,4,1,"ng-container",36),t.k0s()()(),t.DNE(23,N,3,2,"button",37),t.k0s(),t.DNE(24,A,8,3,"div",38),t.k0s(),t.j41(25,"div",39)(26,"p",40),t.EFF(27,"Approval chain"),t.k0s(),t.j41(28,"ol",41),t.DNE(29,J,12,8,"li",42),t.k0s()(),t.j41(30,"div",43)(31,"p",40),t.EFF(32,"Settings"),t.k0s(),t.DNE(33,q,2,0,"p",44)(34,rt,2,2,"div",45),t.j41(35,"div",46),t.DNE(36,at,3,0,"p",47)(37,_t,11,9,"ng-container",36),t.k0s()()()),2&n){const o=r.$implicit,e=t.XpG();t.BMQ("data-testid","workflow-card-"+o.dto.documentType),t.R7$(5),t.JRh(e.labelFor(o.dto.documentType)),t.R7$(2),t.JRh(e.hintFor(o.dto.documentType)),t.R7$(),t.Y8G("ngClass",e.sourceClass(o.dto.source)),t.R7$(),t.SpI(" ",e.sourceLabel(o.dto.source)," "),t.R7$(7),t.SpI(" ",o.definition.name," "),t.R7$(2),t.SpI("v",o.definition.version),t.R7$(),t.Y8G("ngIf",o.pendingDefinitionId),t.R7$(2),t.Lme(" ",e.approvalStepCount(o)," approval ",1===e.approvalStepCount(o)?"step":"steps"," "),t.R7$(),t.Y8G("ngIf",e.awardModeLabel(o)),t.R7$(),t.Y8G("ngIf",o.dto.editable),t.R7$(),t.Y8G("ngIf",o.showTemplates),t.R7$(5),t.Y8G("ngForOf",o.definition.steps)("ngForTrackBy",e.trackByKey),t.R7$(4),t.Y8G("ngIf",0===o.definition.params.length),t.R7$(),t.Y8G("ngIf",o.definition.params.length>0),t.R7$(2),t.Y8G("ngIf",!o.dto.editable),t.R7$(),t.Y8G("ngIf",o.dto.editable)}}const ut={MR:"Material requests",SR:"Service requests",PO:"Purchase orders",WO:"Work orders",RFQ:"Award approval"},bt={MR:"Who approves a material request before it becomes an RFQ.",SR:"Who approves a service request before it becomes an RFQ.",PO:"Who approves a purchase order before it goes to the seller.",WO:"Who approves a work order before it goes to the seller.",RFQ:"How a quote is chosen: a committee vote, or a recommendation routed for approval."},xt={ASSIGNMENT:"Set by your organisation",LEGACY_RULE:"From your approval rules",PLATFORM_DEFAULT:"Platform default",BUILT_IN:"Built in"},j=["MR","SR","PO","WO","RFQ"];let ht=(()=>{var n;class r{constructor(e,s,a){this.settingsService=e,this.toastService=s,this.location=a,this.cards=[],this.loading=!0,this.loadFailed=!1,(0,I.a)({arrowBackOutline:g.arrowBackOutline,checkmarkOutline:g.checkmarkOutline,closeOutline:g.closeOutline,gitBranchOutline:g.gitBranchOutline,informationCircleOutline:g.informationCircleOutline,refreshOutline:g.refreshOutline,swapHorizontalOutline:g.swapHorizontalOutline})}ngOnInit(){this.load()}goBack(){this.location.back()}load(){this.loading=!0,this.loadFailed=!1,this.settingsService.getSettings().subscribe({next:e=>{this.cards=this.sortRows(e).map(s=>this.buildCard(s)),this.loading=!1},error:()=>{this.loading=!1,this.loadFailed=!0,this.toastService.show("Could not load workflow settings.","danger")}})}sortRows(e){return[...e].sort((s,a)=>j.indexOf(s.documentType)-j.indexOf(a.documentType))}buildCard(e){return{dto:e,definition:e.definition,form:this.seedForm(e.definition,e.params),pendingDefinitionId:null,templates:[],templatesLoading:!1,showTemplates:!1,saving:!1}}seedForm(e,s){const a=y(e);for(const[l,b]of Object.entries(s??{}))l in a&&(a[l]=b??"");return a}labelFor(e){return ut[e]??e}hintFor(e){return bt[e]??""}sourceLabel(e){return xt[e]??e}sourceClass(e){return"ASSIGNMENT"===e?"bg-emerald-50 text-emerald-700 border-emerald-200":"bg-slate-100 text-slate-600 border-slate-200"}awardModeLabel(e){return"RFQ"===e.dto.documentType&&e.definition.awardMode?"ROUTED"===e.definition.awardMode?"Routed for approval":"Committee vote":null}approvalStepCount(e){return e.definition.steps.filter(s=>"APPROVAL"===s.type).length}trackByType(e,s){return s.dto.documentType}trackByKey(e,s){return s.key}paramOptions(e){return(e.options??[]).map(s=>({label:this.humanise(s),value:s}))}isSelectParam(e){return"ROLE"===e.type||"DESIGNATION"===e.type}onParamChange(e,s,a){e.form={...e.form,[s]:a??""}}isDirty(e){if(e.pendingDefinitionId)return!0;const s=this.seedForm(e.dto.definition,e.dto.params);return Object.keys(e.form).some(a=>(e.form[a]??"")!==(s[a]??""))}isComplete(e){return e.definition.params.every(s=>String(e.form[s.key]??"").trim().length>0)}discard(e){e.definition=e.dto.definition,e.form=this.seedForm(e.dto.definition,e.dto.params),e.pendingDefinitionId=null,e.showTemplates=!1}toggleTemplates(e){e.showTemplates=!e.showTemplates,e.showTemplates&&0===e.templates.length&&!e.templatesLoading&&this.loadTemplates(e)}loadTemplates(e){e.templatesLoading=!0,this.settingsService.getTemplates(e.dto.documentType).subscribe({next:s=>{e.templates=s.filter(a=>"ACTIVE"===a.status),e.templatesLoading=!1},error:()=>{e.templatesLoading=!1,this.toastService.show("Could not load templates.","danger")}})}templateOptions(e){return e.templates.map(s=>({label:`${s.name} (v${s.version})`,value:s.id}))}selectedTemplateId(e){return e.pendingDefinitionId??e.dto.definition.id}selectTemplate(e,s){if(!s)return;if(s===e.dto.definition.id)return void this.discard(e);const a=e.templates.find(l=>l.id===s);a&&(e.definition=function G(n,r=w,o=v){const e=n.spec?.params??[],s=(n.spec?.steps??[]).map(l
1=>({key:l.key,name:l.name,type:l.type,selectorSummary:S(l.selector,e),requiredSignatures:"APPROVAL"===l.type?l.requiredSignatures??1:null,conditionSummary:O(l.condition)})),a=e.map(l=>({key:l.key,label:l.label,type:l.type,defaultValue:l.defaultValue??null,options:"ROLE"===l.type?[...r]:"DESIGNATION"===l.type?[...o]:void 0}));return{id:n.id,code:n.code,name:n.name,description:n.description,version:n.version,steps:s,params:a,awardMode:n.spec?.awardMode??null}}(a,this.knownOptions("ROLE"),this.knownOptions("DESIGNATION")),e.form=y(e.definition),e.pendingDefinitionId=a.id)}knownOptions(e){const s=new Set;for(const a of this.cards)for(const l of a.dto.definition.params??[])l.type===e&&(l.options??[]).forEach(b=>s.add(b));return s.size>0?Array.from(s):"ROLE"===e?w:v}save(e){if(!e.dto.editable||e.saving||!this.isDirty(e)||!this.isComplete(e))return;e.saving=!0;const s=e.pendingDefinitionId?{definitionId:e.pendingDefinitionId,params:{...e.form}}:{params:{...e.form}};this.settingsService.updateSettings(e.dto.documentType,s).subscribe({next:a=>{const l=this.cards.indexOf(e),b=this.buildCard(a);l>=0?this.cards[l]=b:this.cards.push(b),this.toastService.show(`${this.labelFor(a.documentType)} workflow saved.`,"success")},error:a=>{e.saving=!1,this.toastService.show(a?.error?.message||"Could not save the workflow.","danger")}})}humanise(e){if(!e)return"";const s=e.toLowerCase().split("_").filter(Boolean);return 0===s.length?e:s[0].charAt(0).toUpperCase()+s[0].slice(1)+(s.length>1?" "+s.slice(1).join(" "):"")}static#t=n=()=>(this.\u0275fac=function(s){return new(s||r)(t.rXU($),t.rXU(u.f),t.rXU(p.aZ))},this.\u0275cmp=t.VBU({type:r,selectors:[["app-workflow-settings"]],decls:19,vars:6,consts:[["freeInput",""],[1,"bg-page","mobile-content-with-tabs"],["title","Workflow Settings",3,"back"],[1,"hidden","md:block","bg-white","sticky","top-0","z-20","shadow-sm","border-b","border-[#E3DDC7]/60"],[1,"max-w-page-narrow","mx-auto","px-3","md:px-6","py-2.5","md:py-3","flex","items-center","justify-between"],[1,"flex","items-center","space-x-3"],[1,"w-8","h-8","rounded-full","bg-brand/10","hover:bg-brand/20","flex","items-center","justify-center","transition-colors","cursor-pointer","border-none","flex-shrink-0",3,"click"],["name","arrow-back-outline",1,"text-base","text-brand"],[1,"text-page-title","text-brand","m-0","tracking-tight"],[1,"inline-flex","items-center","gap-1.5","h-8","px-3","text-xs","font-semibold","text-slate-600","bg-white","hover:bg-surface-muted","border","border-default","rounded-lg","cursor-pointer","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","refresh-outline",1,"text-sm"],[1,"max-w-page-narrow","mx-auto","px-3","md:px-6","py-5","md:py-6","space-y-5","md:space-y-6"],[1,"text-sm","text-slate-500","m-0"],["class","flex items-center justify-center py-16",4,"ngIf"],["class","rounded-xl border border-red-100 bg-red-50 px-4 py-3 text-sm text-red-700",4,"ngIf"],["class","rounded-xl border border-default bg-white px-4 py-8 text-center text-sm text-slate-500",4,"ngIf"],["class","bg-white rounded-xl shadow-sm border border-[#E3DDC7]/60 overflow-hidden",4,"ngFor","ngForOf","ngForTrackBy"],[1,"flex","items-center","justify-center","py-16"],["name","crescent","color","primary"],[1,"rounded-xl","border","border-red-100","bg-red-50","px-4","py-3","text-sm","text-red-700"],[1,"rounded-xl","border","border-default","bg-white","px-4","py-8","text-center","text-sm","text-slate-500"],[1,"bg-white","rounded-xl","shadow-sm","border","border-[#E3DDC7]/60","overflow-hidden"],[1,"px-5","md:px-6","pt-5","pb-4","border-b","border-light"],[1,"flex","items-start","justify-between","gap-3","flex-wrap"],[1,"min-w-0"],[1,"text-section-title","text-brand","m-0"],[1,"text-xs","text-slate-500","m-0","mt-1"],[1,"inline-flex","items-center","px-2.5","py-1","rounded-full","border","text-xs","font-semibold","whitespace-nowrap",3,"ngClass"],[1,"mt-4","flex","items-center","justify-between","gap-3","flex-wrap"],[1,"flex","items-center","gap-2.5","min-w-0"],[1,"w-9","h-9","rounded-lg","bg-brand/10","flex","items-center","justify-center","flex-shrink-0"],["name","git-branch-outline",1,"text-brand","text-lg"],[1,"text-sm","font-semibold","text-slate-900","m-0","truncate"],[1,"text-xs","font-medium","text-slate-500","ml-1"],["class","ml-2 px-1.5 py-0.5 rounded bg-amber-50 text-amber-700 text-xs font-semibold",4,"ngIf"],[1,"text-xs","text-slate-500","m-0","mt-0.5"],[4,"ngIf"],["type","button","class","inline-flex items-center gap-1.5 h-8 px-3 text-xs font-semibold text-brand bg-brand/5 hover:bg-brand/10 border border-brand/20 rounded-lg cursor-pointer transition-colors",3,"click",4,"ngIf"],["class","mt-4 rounded-xl border border-default bg-surface-muted p-4",4,"ngIf"],[1,"px-5","md:px-6","py-4","border-b","border-light"],[1,"text-label-sm","m-0","mb-3"],[1,"workflow-stepper","m-0","p-0","list-none"],["class","workflow-step",4,"ngFor","ngForOf","ngForTrackBy"],[1,"px-5","md:px-6","py-4"],["class","text-xs text-slate-500 m-0",4,"ngIf"],["class","grid grid-cols-1 md:grid-cols-2 gap-4",4,"ngIf"],[1,"mt-5","flex","items-center","justify-between","gap-3","flex-wrap"],["class","text-xs text-slate-500 m-0 flex items-center gap-1.5",4,"ngIf"],[1,"ml-2","px-1.5","py-0.5","rounded","bg-amber-50","text-amber-700","text-xs","font-semibold"],[1,"text-slate-300"],["type","button",1,"inline-flex","items-center","gap-1.5","h-8","px-3","text-xs","font-semibold","text-brand","bg-brand/5","hover:bg-brand/10","border","border-brand/20","rounded-lg","cursor-pointer","transition-colors",3,"click"],["name","swap-horizontal-outline",1,"text-sm"],[1,"mt-4","rounded-xl","border","border-default","bg-surface-muted","p-4"],[1,"form-label","block","mb-2"],["class","flex items-center gap-2 text-xs text-slate-500",4,"ngIf"],["class","text-xs text-slate-500 m-0 mt-3",4,"ngIf"],[1,"text-xs","text-slate-500","m-0","mt-2"],[1,"flex","items-center","gap-2","text-xs","text-slate-500"],["name","crescent",1,"w-4","h-4"],["placeholder","Choose a template",3,"options","ngModel","ngModelChange",4,"ngIf"],["placeholder","Choose a template",3,"ngModelChange","options","ngModel"],[1,"text-xs","text-slate-500","m-0"],[1,"text-xs","text-slate-500","m-0","mt-3"],[1,"workflow-step"],[1,"workflow-step__marker",3,"ngClass"],["name","information-circle-outline","class","text-sm",4,"ngIf"],[1,"workflow-step__body"],[1,"flex","items-baseline","gap-2","flex-wrap"],[1,"text-sm","font-semibold","text-slate-900"],["class","text-xs text-slate-500",4,"ngIf"],["class","px-1.5 py-0.5 rounded bg-slate-100 text-slate-600 text-xs font-semibold",4,"ngIf"],["class","text-xs text-slate-500 m-0 mt-0.5",4,"ngIf"],["class","text-xs text-amber-700 m-0 mt-0.5",4,"ngIf"],["name","information-circle-outline",1,"text-sm"],[1,"text-xs","text-slate-500"],[1,"px-1.5","py-0.5","rounded","bg-slate-100","text-slate-600","text-xs","font-semibold"],[1,"text-xs","text-amber-700","m-0","mt-0.5"],[1,"grid","grid-cols-1","md:grid-cols-2","gap-4"],["class","form-group",4,"ngFor","ngForOf","ngForTrackBy"],[1,"form-group"],[1,"form-label","block","mb-1.5"],[4,"ngIf","ngIfElse"],[3,"options","ngModel","placeholder","ngModelChange",4,"ngIf"],["class","text-sm text-slate-800 m-0 py-2",4,"ngIf"],[3,"ngModelChange","options","ngModel","placeholder"],[1,"text-sm","text-slate-800","m-0","py-2"],["class","w-full px-3 py-2 rounded-lg border border-default bg-white text-sm text-slate-900 focus:border-brand focus:ring-2 focus:ring-brand/20 outline-none",3,"id","type","ngModel","ngModelChange",4,"ngIf"],[1,"w-full","px-3","py-2","rounded-lg","border","border-default","bg-white","text-sm","text-slate-900","focus:border-brand","focus:ring-2","focus:ring-brand/20","outline-none",3,"ngModelChange","id","type","ngModel"],[1,"text-xs","text-slate-500","m-0","flex","items-center","gap-1.5"],["name","information-circle-outline",1,"text-sm","text-slate-500"],[1,"flex","items-center","gap-2"],["type","button","class","inline-flex items-center gap-1.5 h-9 px-3 text-xs font-semibold text-slate-600 bg-white hover:bg-surface-muted border border-default rounded-lg cursor-pointer disabled:opacity-50 transition-colors",3,"disabled","click",4,"ngIf"],["type","button",1,"inline-flex","items-center","gap-1.5","h-9","px-4","text-xs","font-semibold","text-white","bg-brand","hover:bg-brand-hover","rounded-lg","shadow-sm","shadow-brand/20","border-none","cursor-pointer","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","crescent","class","w-4 h-4",4,"ngIf"],["name","checkmark-outline","class","text-sm",4,"ngIf"],["type","button",1,"inline-flex","items-center","gap-1.5","h-9","px-3","text-xs","font-semibold","text-slate-600","bg-white","hover:bg-surface-muted","border","border-default","rounded-lg","cursor-pointer","disabled:opacity-50","transition-colors",3,"click","disabled"],["name","close-outline",1,"text-sm"],["name","checkmark-outline",1,"text-sm"]],template:function(s,a){1&s&&(t.j41(0,"ion-content",1)(1,"app-mobile-ribbon",2),t.bIt("back",function(){return a.goBack()}),t.k0s(),t.j41(2,"header",3)(3,"div",4)(4,"div",5)(5,"button",6),t.bIt("click",function(){return a.goBack()}),t.nrm(6,"ion-icon",7),t.k0s(),t.j41(7,"h1",8),t.EFF(8,"Workflow Settings"),t.k0s()(),t.j41(9,"button",9),t.bIt("click",function(){return a.load()}),t.nrm(10,"ion-icon",10),t.EFF(11," Refresh "),t.k0s()()(),t.j41(12,"main",11)(13,"p",12),t.EFF(14," Eac
1h document type runs on a workflow template. Pick the template that matches how your organisation approves, then fill in its settings. "),t.k0s(),t.DNE(15,f,2,0,"div",13)(16,d,2,0,"div",14)(17,h,2,0,"div",15)(18,gt,38,19,"section",16),t.k0s()()),2&s&&(t.R7$(9),t.Y8G("disabled",a.loading),t.R7$(6),t.Y8G("ngIf",a.loading),t.R7$(),t.Y8G("ngIf",!a.loading&&a.loadFailed),t.R7$(),t.Y8G("ngIf",!a.loading&&!a.loadFailed&&0===a.cards.length),t.R7$(),t.Y8G("ngForOf",a.cards)("ngForTrackBy",a.trackByType))},dependencies:[i.MD,i.YU,i.Sq,i.bT,x.YN,x.me,x.BC,x.vS,k.bv,k.W9,k.iq,k.w2,P.Y,C.o],styles:['.workflow-stepper[_ngcontent-%COMP%]{position:relative}.workflow-step[_ngcontent-%COMP%]{position:relative;display:flex;align-items:flex-start;gap:.75rem;padding-bottom:1rem}.workflow-step[_ngcontent-%COMP%]:not(:last-child):before{content:"";position:absolute;left:.875rem;top:1.75rem;bottom:0;width:2px;background:var(--color-border-light, #f1f5f9)}.workflow-step[_ngcontent-%COMP%]:last-child{padding-bottom:0}.workflow-step__marker[_ngcontent-%COMP%]{width:1.75rem;height:1.75rem;border-radius:9999px;display:flex;align-items:center;justify-content:center;font-size:.75rem;font-weight:600;flex-shrink:0;position:relative;z-index:1}.workflow-step__marker--approval[_ngcontent-%COMP%]{background:var(--color-brand-primary, #00478f);color:#fff}.workflow-step__marker--notify[_ngcontent-%COMP%]{background:var(--color-bg-surface-muted, #f8fafc);color:var(--color-text-muted, #64748b);border:1px solid var(--color-border-default, #e2e8f0)}.workflow-step__body[_ngcontent-%COMP%]{flex:1;min-width:0;padding-top:.25rem}']}))}return n(),r})()},91087(M,T,c){c.d(T,{o:()=>C});var i=c(92958),x=c(87018),k=c(43273),I=c(81421),g=c(88683),_=c(84709),F=c(20373),m=c(90993),w=c(31328);const v=["projectedContent"],E=["*"];function S(t,u){if(1&t){const p=i.RV6();i.j41(0,"button",8),i.bIt("click",function(){_.eBV(p);const d=i.XpG(2);return _.Njj(d.onMenuToggle())}),_.qSk(),i.j41(1,"svg",9),i.nrm(2,"line",10)(3,"line",11)(4,"line",12),i.k0s()()}}function O(t,u){if(1&t){const p=i.RV6();i.j41(0,"button",8),i.bIt("click",function(){_.eBV(p);const d=i.XpG(2);return _.Njj(d.back.emit())}),i.nrm(1,"ion-icon",13),i.k0s()}}function G(t,u){if(1&t&&(i.j41(0,"span",14),i.EFF(1),i.k0s()),2&t){const p=i.XpG(2);i.R7$(),i.SpI(" ",p.title," ")}}function y(t,u){if(1&t){const p=i.RV6();i.qex(0),i.j41(1,"button",15),i.bIt("click",function(){_.eBV(p);const d=i.XpG(2);return _.Njj(d.previous.emit())}),i.nrm(2,"ion-icon",16),i.k0s(),i.j41(3,"button",15),i.bIt("click",function(){_.eBV(p);const d=i.XpG(2);return _.Njj(d.next.emit())}),i.nrm(4,"ion-icon",17),i.k0s(),i.bVm()}if(2&t){const p=i.XpG(2);i.R7$(),i.Y8G("disabled",!p.hasPrevious),i.R7$(2),i.Y8G("disabled",!p.hasNext)}}function $(t,u){if(1&t){const p=i.RV6();i.j41(0,"button",18),i.bIt("click",function(){_.eBV(p);const d=i.XpG(2);return _.Njj(d.action.emit())}),i.nrm(1,"ion-icon",19),i.EFF(2),i.k0s()}if(2&t){const p=i.XpG(2);i.R7$(2),i.SpI(" ",p.actionLabel," ")}}function P(t,u){if(1&t&&(i.j41(0,"div",2)(1,"div",3),i.DNE(2,S,5,0,"button",4)(3,O,2,0,"button",4)(4,G,2,1,"span",5)(5,y,5,2,"ng-container",6),i.j41(6,"span",null,0),i.SdG(8),i.k0s(),i.DNE(9,$,3,1,"button",7),i.k0s()()),2&t){const p=i.XpG();i.R7$(2),i.Y8G("ngIf",!p.mobileTabsActive&&!p.showBack),i.R7$(),i.Y8G("ngIf",p.showBack),i.R7$(),i.Y8G("ngIf",p.title),i.R7$(),i.Y8G("ngIf",p.showPagination),i.R7$(4),i.Y8G("ngIf",p.actionLabel)}}let C=(()=>{var t;class u{constructor(f,d,h){this.menuService=f,this.appState=d,this.router=h,this.showBack=!0,this.title="",this.showPagination=!1,this.hasPrevious=!1,this.hasNext=!1,this.actionLabel="",this.status="",this.statusClass="",this.back=new i.bkB,this.previous=new i.bkB,this.next=new i.bkB,this.action=new i.bkB,this.mobileTabsActive=!1,this.hasProjectedButtons=!1,this.tabRoutes=["/dashboard","/account"],(0,I.a)({menuOutline:g.menuOutline,arrowBackOutline:g.arrowBackOutline,chevronBackOutline:g.chevronBackOutline,chevronForwardOutline:g.chevronForwardOutline,addOutline:g.addOutline})}ngOnInit(){this.menuService.setPageHasOwnMenuToggle(!0),this.tabsSub=this.appState.mobileTabsActive$.subscribe(f=>this.mobileTabsActive=f)}ngAfterViewInit(){setTimeout(()=>{this.projectedContentRef&&(this.hasProjectedButtons=this.projectedContentRef.nativeElement.children.length>0)})}ngOnDestroy(){this.menuService.setPageHasOwnMenuToggle(!1),this.tabsSub?.unsubscribe()}get shouldHideRibbon(){if(!this.mobileTabsActive)return!1;const f=this.router.url.split("?")[0];return this.tabRoutes.includes(f)}onMenuToggle(){this.menuService.toggle("main-menu")}static#t=t=()=>(this.\u0275fac=function(d){return new(d||u)(i.rXU(F.$),i.rXU(m.i),i.rXU(w.Ix))},this.\u0275cmp=i.VBU({type:u,selectors:[["app-mobile-ribbon"]],viewQuery:function(d,h){if(1&d&&i.GBs(v,5),2&d){let R;i.mGM(R=i.lsd())&&(h.projectedContentRef=R.first)}},inputs:{showBack:"showBack",title:"title",showPagination:"showPagination",hasPrevious:"hasPrevious",hasNext:"hasNext",actionLabel:"actionLabel",status:"status",statusClass:"statusClass"},outputs:{back:"back",previous:"previous",next:"next",action:"action"},ngContentSelectors:E,decls:1,vars:1,consts:[["projectedContent",""],["class","md:hidden sticky top-0 z-20 px-4 pb-3 bg-white border-b border-slate-100","style","padding-top: calc(12px + env(safe-area-inset-top, 0px))",4,"ngIf"],[1,"md:hidden","sticky","top-0","z-20","px-4","pb-3","bg-white","border-b","border-slate-100",2,"padding-top","calc(12px + env(safe-area-inset-top, 0px))"],[1,"flex","items-center","gap-2"],["class","w-9 h-9 rounded-full bg-[#00478F]/10 hover:bg-[#00478F]/20 flex items-center justify-center transition-colors cursor-pointer border-none flex-shrink-0",3,"click",4,"ngIf"],["class","text-xl font-bold text-[#00478F] flex-1 min-w-0 truncate leading-tight py-0.5",4,"ngIf"],[4,"ngIf"],["class","flex items-center gap-1 px-3 py-1.5 bg-[#00478F] text-white rounded-lg text-[12px] font-semibold border-none cursor-pointer hover:bg-[#002f6c] transition-colors flex-shrink-0",3,"click",4,"ngIf"],[1,"w-9","h-9","rounded-full","bg-[#00478F]/10","hover:bg-[#00478F]/20","flex","items-center","justify-center","transition-colors","cursor-pointer","border-none","flex-shrink-0",3,"click"],["xmlns","http://www.w3.org/2000/svg","width","18","height","18","viewBox","0 0 24 24","fill","none","stroke","#00478F","stroke-width","2","stroke-linecap","round","aria-hidden","true"],["x1","4","y1","7","x2","20","y2","7"],["x1","4","y1","12","x2","20","y2","12"],["x1","4","y1","17","x2","20","y2","17"],["name","arrow-back-outline",1,"text-lg","text-[#00478F]"],[1,"text-xl","font-bold","text-[#00478F]","flex-1","min-w-0","truncate","leading-tight","py-0.5"],[1,"w-7","h-7","rounded-lg","bg-white","border","border-gray-200","flex","items-center","justify-center","hover:bg-gray-50","transition-colors","disabled:opacity-40","disabled:cursor-not-allowed","text-[#00478F]","shadow-sm","cursor-pointer","flex-shrink-0",3,"click","disabled"],["name","chevron-back-outline",1,"text-sm"],["name","chevron-forward-outline",1,"text-sm"],[1,"flex","items-center","gap-1","px-3","py-1.5","bg-[#00478F]","text-white","rounded-lg","text-[12px]","font-semibold","border-none","cursor-pointer","hover:bg-[#002f6c]","transition-colors","flex-shrink-0",3,"click"],["name","add-outline",1,"text-sm"]],template:function(d,h){1&d&&(i.NAR(),i.DNE(0,P,10,5,"div",1)),2&d&&i.Y8G("ngIf",!h.shouldHideRibbon)},dependencies:[x.MD,x.bT,k.iq],encapsulation:2}))}return t(),u})()}}]);

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.