PageSourceSearch

https://movimoney.com/customer/chunk-5BKEO5F4.js

js movimoney.com collected 2026-10-08 18:39:04 UTC 13,139 bytes, 1 lines download raw bytes

1import{a as He}from"./chunk-5XFA47WU.js";import{a as Y}from"./chunk-2J3JPL6J.js";import{a as Z}from"./chunk-LCBBQNFD.js";import{$ as n,$b as _e,$d as De,Cb as fe,D as se,Da as K,E as le,Ed as we,Fb as he,Fc as ye,G as W,Ia as G,Ja as _,Jb as y,K as T,L as k,Ne as qe,Od as Ne,Qa as pe,Sb as ve,Sd as Pe,Te as $,Ua as l,Uc as Q,Ud as I,Va as de,Vd as Te,Wa as A,Wd as ke,Xe as N,Yb as Ce,Ye as P,Zd as Ge,Ze as Be,_c as Ee,_d as w,ad as Ie,bb as R,bc as F,c as oe,dc as be,dd as X,ec as ge,fa as u,fc as Se,fe as Ue,g as re,ga as V,gc as xe,ge as Me,ha as ce,he as Ve,i as ne,ib as v,ie as Ae,jb as C,je as Re,kc as E,me as Fe,ne as $e,oa as c,pa as p,q as M,qe as je,ra as L,sa as z,sb as me,t as ae,ta as J,ua as d,va as a,vb as ue,wa as r,xa as g,z as x}from"./chunk-3P7ZQ3JU.js";import{a as H,b as O}from"./chunk-MG3ERZGY.js";var j=(()=>{class t{constructor(e,i){this.httpClient=e,this.userInfoService=i,this.apiPath="",this.getNotes=()=>this.httpClient.get(`${this.apiPath}`),this.getNoteById=S=>this.httpClient.get(`${this.apiPath}/${S}`),this.createNote=S=>this.httpClient.post(`${this.apiPath}`,S),this.updateNote=(S,q)=>this.httpClient.put(`${this.apiPath}/${S}`,q);let o=this.userInfoService.getUserData().activeTenantId,f=this.userInfoService.getUserData().activePortfolioId;this.apiPath=`/api/tenant/${o}/portfolio/${f}/note`}static{this.\u0275fac=function(i){return new(i||t)(W(ve),W(E))}}static{this.\u0275prov=se({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();function Ze(t,s){t&1&&g(0,"flux-workspace-spinner")}function et(t,s){if(t&1&&g(0,"flux-workspace-tables-widget",0),t&2){let e=_(),i=_();d("activeSubscription",i.activeSubscription)("model",e.tableWidgetModel)("createTitleButton","Create Notes")("editTitleButton","Edit Notes")("showPaginator",!0)("totalItems",i.totalItems)}}function tt(t,s){t&1&&c(0,Ze,1,0,"flux-workspace-spinner")(1,et,1,6,"flux-workspace-tables-widget",0),t&2&&p(s.loading?0:1)}var Le=(()=>{class t{constructor(e,i,o){this.noteApiService=e,this.translateService=i,this.userInfoService=o,this.viewModel$=new oe(new Be(new je("Notes",[new P("Id","",!1),new P("Title","1"),new P("Description","2"),new P("Date","3"),new P("Real Estate Property","4")],[],[Q.Add],[Q.Edit],"Note"),!0)),this.activeSubscription=!1,this.totalItems=0}ngOnInit(){this.activeSubscription=this.userInfoService.activePortfolioSubscription(),this.noteApiService.getNotes().pipe(x(e=>{this.totalItems=e.length;let i=this.viewModel$.getValue();i.tableWidgetModel.tableData=e.map(o=>{let f="";return o.realEstateProperty&&(f=`${o.realEstateProperty.name} ${o.realEstateProperty.active?"":this.translateService.instant("(Inactive)")}`),[new N(o.id.toString(),!1),new N(o.title,!0,"max-text-length",!0,!1),new N(o.description,!0,"max-text-length",!0,!1),new N(new he(we).transform(new Date(o.date),ye.English)),new N(f)]}),this.viewModel$.next(O(H({},i),{loading:!1}))}),M(e=>{let i=this.viewModel$.getValue();throw this.viewModel$.next(O(H({},i),{loading:!1})),e})).subscribe()}static{this.\u0275fac=function(i){return new(i||t)(u(j),u(be),u(E))}}static{this.\u0275cmp=V({type:t,selectors:[["flux-workspace-notes"]],decls:2,vars:3,consts:[[3,"activeSubscription","model","createTitleButton","editTitleButton","showPaginator","totalItems"]],template:function(i,o){if(i&1&&(c(0,tt,2,1),v(1,"async")),i&2){let f;p((f=C(1,1,o.viewModel$))?0:-1,f)}},dependencies:[y,qe,$,fe],encapsulation:2,changeDetection:0})}}return t})();var D=class{constructor(s,e,i,o,f){this.title=s,this.description=e,this.date=i,this.realEstatePropertyId=o,this.unitId=f}};var te=t=>({"is-invalid":t});function it(t,s){t&1&&g(0,"flux-workspace-spinner")}function ot(t,s){t&1&&(a(0,"div",12),l(1," Title is required. "),r())}function rt(t,s){t&1&&(a(0,"div",12),l(1," Title must be less than or equal to 50 characters. "),r())}function nt(t,s){t&1&&(a(0,"div",12),l(1," Description is required. "),r())}function at(t,s){t&1&&(a(0,"div",12),l(1," Description must be less than or equal to 1000 characters. "),r())}function st(t,s){t&1&&(l(0),v(1,"translate")),t&2&&A(" ",C(1,1,"(Inactive)")," ")}function lt(t,s){if(t&1&&(a(0,"option",18),l(1),c(2,st,2,3),r()),t&2){let e=s.$implicit;d("value",e.id),n(),A(" ",e.name," "),n(),p(e.active?-1:2)}}function ct(t,s){t&1&&(a(0,"div",12),l(1," Real Estate Property is required. "),r())}function pt(t,s){if(t&1&&(a(0,"option",18),l(1),v(2,"translate"),r()),t&2){let e=s.$implicit;d("value",e.id),n(),A(" ",C(2,2,e.name)," ")}}function dt(t,s){if(t&1&&(a(0,"fieldset",19)(1,"label",27),l(2," Units "),r(),a(3,"select",28)(4,"option",29),l(5,"Select a unit"),r(),z(6,pt,3,4,"option",18,L),r()()),t&2){let e=_(2);n(4),d("ngValue",null),n(2),J(e.units)}}function mt(t,s){t&1&&(a(0,"div",12),l(1," Date is required. "),r())}function ut(t,s){if(t&1){let e=K();a(0,"button",30),v(1,"translate"),G("click",function(){T(e);let o=_(2);return k(o.save())}),l(2," Save "),r()}if(t&2){let e=_(2);d("title",C(1,2,"Save changes and submit current form"))("disabled",e.formGroup.invalid||e.saving)}}function ft(t,s){if(t&1){let e=K();a(0,"section",1)(1,"header",2)(2,"article",3)(3,"h3",4),l(4),v(5,"translate"),r()(),a(6,"button",5),v(7,"translate"),G("click",function(){T(e);let o=_();return k(o.exit())}),g(8,"i",6),r()(),a(9,"main",7)(10,"form",8)(11,"fieldset",9)(12,"label",10),l(13,"Title"),r(),g(14,"input",11),v(15,"translate"),c(16,ot,2,0,"div",12),c(17,rt,2,0,"div",12),r(),a(18,"fieldset",9)(19,"label",13),l(20," Description "),r(),g(21,"textarea",14),v(22,"translate"),c(23,nt,2,0,"div",12),c(24,at,2,0,"div",12),r(),a(25,"fieldset",9)(26,"label",15),l(27," Real Estate Property "),r(),a(28,"select",16)(29,"option",17),l(30,"Select a property"),r(),z(31,lt,3,3,"option",18,L),r(),c(33,ct,2,0,"div",12),r(),c(34,dt,8,1,"fieldset",19),a(35,"fieldset",20)(36,"label",21),l(37," Date "),r(),a(38,"article",22)(39,"input",23,0),G("click",function(){T(e);let o=pe(40);return k(o.showPicker())}),r(),c(41,mt,2,0,"div",12),r()()()(),a(42,"footer",24)(43,"button",25),v(44,"translate"),G("click",function(){T(e);let o=_();return k(o.exit())}
1),l(45," Cancel "),r(),c(46,ut,3,4,"button",26),r()()}if(t&2){let e=_();n(4),de(C(5,19,e.title)),n(2),d("title",C(7,21,"Go back to Notes")),n(4),d("formGroup",e.formGroup),n(4),d("placeholder",C(15,23,"Title"))("ngClass",R(29,te,e.formGroup.controls.title.errors&&e.formGroup.controls.title.touched)),n(2),p((e.formGroup.controls.title.hasError("required")||e.formGroup.controls.title.hasError("blankSpace"))&&e.formGroup.controls.title.touched?16:-1),n(),p(e.formGroup.controls.title.hasError("maxlength")&&e.formGroup.controls.title.touched?17:-1),n(4),d("placeholder",C(22,25,"Description"))("ngClass",R(31,te,e.formGroup.controls.description.errors&&e.formGroup.controls.description.touched)),n(2),p((e.formGroup.controls.description.hasError("required")||e.formGroup.controls.description.hasError("blankSpace"))&&e.formGroup.controls.description.touched?23:-1),n(),p(e.formGroup.controls.description.hasError("maxlength")&&e.formGroup.controls.description.touched?24:-1),n(5),d("value",null),n(2),J(e.realEstateProperties),n(2),p(e.formGroup.controls.realEstatePropertyId.hasError("required")&&e.formGroup.controls.realEstatePropertyId.touched?33:-1),n(),p(e.formGroup.controls.realEstatePropertyId.value?34:-1),n(5),d("ngClass",R(33,te,e.formGroup.controls.date.errors&&e.formGroup.controls.date.touched)),n(2),p(e.formGroup.controls.date.hasError("required")&&e.formGroup.controls.date.touched?41:-1),n(2),d("title",C(44,27,"Go back to all notes"))("disabled",e.saving),n(3),p(e.activeSubscription?46:-1)}}var ie=(()=>{class t{constructor(e,i,o,f,S,q,Je,Ke){this.router=e,this.activatedRoute=i,this.realEstatePropertyApiService=o,this.noteApiService=f,this.alertService=S,this.changeDetectorRef=q,this.translationService=Je,this.userInfoService=Ke,this.formGroup=new Ge({title:new w("",[I.required,I.maxLength(50),X()]),description:new w(null,[I.required,I.maxLength(1e3),X()]),date:new w(null,[I.required]),realEstatePropertyId:new w(null),unitId:new w(null)}),this.ignorePreventUnsavedChanges=!1,this.title="Create Note",this.saving=!1,this.loading=!0,this.realEstateProperties=[],this.units=[],this.activeSubscription=!1,this.subscriptions=[],this.save=()=>{this.saving=!0,(this.id?this.update():this.create()).pipe(x(()=>{this.ignorePreventUnsavedChanges=!0,this.alertService.showSuccess(),this.exit()}),M(m=>{throw this.saving=!1,this.changeDetectorRef.markForCheck(),m})).subscribe()},this.exit=()=>{this.router.navigate(["/app/notes"])},this.update=()=>{let h=this.formGroup.getRawValue(),m=this.formGroup.controls.realEstatePropertyId.value,b=this.formGroup.controls.unitId.value,U=new D(h.title,h.description.trim(),h.date,m&&isNaN(m)?void 0:m,b&&isNaN(b)?void 0:b);return this.noteApiService.updateNote(this.id,U)},this.create=()=>{let h=this.formGroup.getRawValue(),m=this.formGroup.controls.realEstatePropertyId.value,b=new D(h.title,h.description.trim(),h.date,m&&isNaN(m)?void 0:m,h.unitId);return this.noteApiService.createNote(b)},this.valueChanges=()=>{let h=this.formGroup.controls.realEstatePropertyId.valueChanges.pipe(x(m=>{m&&isNaN(m)&&this.formGroup.controls.realEstatePropertyId.setValue(null,{emitEvent:!1,onlySelf:!0});let b=this.realEstateProperties.find(B=>B.id==m),U=b?b.units:[];U.sort((B,Qe)=>B.name.localeCompare(Qe.name)),this.units=U,this.formGroup.controls.unitId.setValue(null),this.changeDetectorRef.markForCheck()}));this.subscriptions.push(h.subscribe())},this.upsertModule=this.translationService.translateText("a note")}ngOnInit(){this.activeSubscription=this.userInfoService.activePortfolioSubscription(),this.id=this.activatedRoute.snapshot.params.id,ne([this.id?this.noteApiService.getNoteById(this.id):re(void 0),this.realEstatePropertyApiService.getRealEstateProperties()]).pipe(ae(1),x(([e,i])=>{e?(this.realEstateProperties=i.filter(o=>o.active||o.id===e.realEstateProperty?.id),this.title="Edit Note",this.formGroup.patchValue({title:e.title,description:e.description,date:e.date?Ee.getDateForInput(e.date):null,realEstatePropertyId:e.realEstateProperty?e.realEstateProperty.id:null,unitId:e.unitId})):this.realEstateProperties=i.filter(o=>o.active),this.loading=!1,this.changeDetectorRef.markForCheck()})).subscribe(),this.valueChanges()}
1ngOnDestroy(){this.subscriptions.forEach(e=>e.unsubscribe())}static{this.\u0275fac=function(i){return new(i||t)(u(_e),u(Ce),u(He),u(j),u(Ie),u(me),u(Ne),u(E))}}static{this.\u0275cmp=V({type:t,selectors:[["flux-workspace-upsert-note"]],decls:2,vars:2,consts:[["date",""],[1,"card","mb-5","mb-xl-10"],[1,"card-header","d-flex","align-items-center"],[1,"card-title","m-0"],[1,"fw-bolder","m-0"],["id","top-cancel-btn","type","button","data-bs-dismiss","modal",1,"btn","btn-sm","btn-icon","btn-danger",3,"click","title"],[1,"fa-solid","fa-xmark"],[1,"card-body","p-9"],[1,"form",3,"formGroup"],[1,"fv-row","mb-8"],["for","title","translate","",1,"form-label","fs-6","fw-bolder","text-dark","required"],["formControlName","title","type","text","id","title","name","title",1,"form-control","form-control-lg","mb-3","mb-lg-0",3,"placeholder","ngClass"],["translate","",1,"invalid-feedback"],["for","description","translate","",1,"form-label","fs-6","fw-bolder","text-dark","required"],["formControlName","description","id","description","rows","8","name","description",1,"form-control","form-control-lg","mb-3","mb-lg-0",3,"placeholder","ngClass"],["for","realEstatePropertyId","translate","",1,"form-label","fs-6","fw-bolder","text-dark"],["formControlName","realEstatePropertyId","id","realEstatePropertyId","name","realEstatePropertyId",1,"form-select"],["translate","",3,"value"],[3,"value"],[1,"mb-6","p-b-15"],[1,"fv-row","mb-0"],["for","date","translate","",1,"form-label","fs-6","fw-bolder","text-dark","required"],[1,"fv-row"],["type","date","formControlName","date","placeholder","Date","id","date","name","date",1,"form-control","form-control-lg",3,"click","ngClass"],[1,"d-flex","justify-content-start","pb-6","px-9"],["id","cancel-btn","type","button","translate","",1,"btn","btn-sm","btn-danger","m-r-8",3,"click","title","disabled"],["id","save-btn","type","button","translate","",1,"btn","btn-sm","btn-primary",3,"title","disabled"],["translate","",1,"form-label","fs-6","fw-bolder","text-dark"],["formControlName","unitId",1,"form-select"],["selected","","translate","",3,"ngValue"],["id","save-btn","type","button","translate","",1,"btn","btn-sm","btn-primary",3,"click","title","disabled"]],template:function(i,o){i&1&&(c(0,it,1,0,"flux-workspace-spinner"),c(1,ft,47,35,"section",1)),i&2&&(p(o.loading?0:-1),n(),p(o.loading?-1:1))},dependencies:[y,ue,F,Fe,De,Ae,Re,Pe,Ve,Te,ke,$e,Me,Ue,xe,ge,$,Se],encapsulation:2,changeDetection:0})}}return t})();var ze=[{path:"",loadComponent:()=>Le},{path:"update/:id",title:"Edit Note",canActivate:[Z],canDeactivate:[Y],component:ie},{path:"create",title:"Create Note",canActivate:[Z],canDeactivate:[Y],component:ie}];var ni=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=ce({type:t})}static{this.\u0275inj=le({imports:[y,F.forChild(ze)]})}}return t})();export{ni as NoteShellModule};

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.