PageSourceSearch

https://montri.fr/chunk-LQUX7PVH.js

js montri.fr collected 2026-09-25 03:10:50 UTC 5,005 bytes, 5 lines download raw bytes

1import{a as z}from"./chunk-5776RKEX.js";import"./chunk-4YV4JMRG.js";import{H as O,I as N}from"./chunk-DWBTTFIV.js";import"./chunk-YO4JHTBQ.js";import"./chunk-KJGUQLZL.js";import{a as T}from"./chunk-KGJ2ZQVY.js";import{f as R}from"./chunk-NXJNUPQ3.js";import"./chunk-S34CRAI4.js";import{f as D,n as w,q as B}from"./chunk-KF3EAUWK.js";import{$b as C,Ab as g,Hb as I,Jb as h,Lb as d,Oc as P,Qa as i,Zb as a,ab as S,ba as y,bc as x,ga as p,jc as E,lc as M,ma as A,na as b,rb as l,sb as m,tc as k,wc as v,xb as f,yb as c,za as _,zb as o}from"./chunk-33WATMYR.js";var u=class t{apiAppointmentService=p(w);bookedAppointment(n){return this.apiAppointmentService.appointmentControllerGetBookedAppointmentV1({bookedAppointmentId:n})}cancel(n,e){return this.apiAppointmentService.appointmentControllerCancelAppointmentV1({contractId:n,bookedAppointmentId:e})}static \u0275fac=function(e){return new(e||t)};static \u0275prov=y({token:t,factory:t.\u0275fac,providedIn:"root"})};function L(t,n){t&1&&g(0,"montri-spinner",1)}function F(t,n){if(t&1&&(c(0,"p",6),a(1),o(),c(2,"a",7),a(3,"Prendre un autre rendez-vous"),o()),t&2){let e=d(2);i(),C(" Votre rendez-vous a ",e.isAppointmentCancelled()?"bien":"d\xE9j\xE0",` \xE9t\xE9 annul\xE9
2`),i(),f("routerLink",e.complaintsRoute)}}function U(t,n){t&1&&g(0,"montri-spinner",9)}function W(t,n){if(t&1){let e=I();c(0,"button",8),h("click",function(){A(e);let s=d(2);return b(s.cancelAppointment())}),a(1," Annuler le rendez-vous "),l(2,U,1,0,"montri-spinner",9),o()}if(t&2){let e=d(2);f("disabled",e.isCancelling()),i(2),m(e.isCancelling()?2:-1)}}function G(t,n){if(t&1&&(c(0,"p",3)(1,"span",4),a(2,"Objet : "),o(),a(3),o(),c(4,"p",3)(5,"span",4),a(6,"Date du rendez-vous : "),o(),a(7),E(8,"date"),o(),l(9,F,4,2)(10,W,3,2,"button",5)),t&2){let e=n,r=d();i(3),C("",e.dynamicFormName,`
3`),i(4),x("le ",M(8,5,e.bookingDate,"dd/MM/yyyy")," de ",e.timeFrom," \xE0 ",e.timeTo,`
4`),i(2),m(r.isAppointmentCancelled()||e.status==="cancelled"?9:10)}}function $(t,n){t&1&&(c(0,"p",2),a(1,` Une erreur est survenue pendant la r\xE9cup\xE9ration de votre rendez-vous, veuillez r\xE9essayer
5`),o())}var V=class t{appointmentService=p(u);authentificationService=p(R);citiesService=p(B);contractService=p(T);contractId=v();appointmentId=v();isCancelling=_(!1);isAppointmentCancelled=_(!1);complaintsRoute="/services/reporting";appointmentResource=k({params:()=>({contractId:this.contractId(),appointmentId:this.appointmentId()}),loader:async({params:n})=>{if(n.contractId&&n.appointmentId)try{return await this.tryToSignInAnonymously(n.contractId),this.authentificationService.isLoggedIn()||await this.registerAnonymousUser(n.contractId),this.appointmentService.bookedAppointment(n.appointmentId)}catch{return}}});async tryToSignInAnonymously(n){this.contractService.contractId()===n?await this.authentificationService.signInAnonymously():this.authentificationService.logOut()}async registerAnonymousUser(n){let e=await this.citiesService.citiesControllerGetCitiesByContractV1({contractId:n});await this.authentificationService.registerAnonymously(e[0].contractId,e[0].inseeCode)}async cancelAppointment(){let n=this.contractId(),e=this.appointmentId();if(n&&e)try{this.isCancelling.set(!0),await this.appointmentService.cancel(n,e),this.isCancelling.set(!1),this.isAppointmentCancelled.set(!0)}catch{this.isCancelling.set(!1)}}static \u0275fac=function(e){return new(e||t)};static \u0275cmp=S({type:t,selectors:[["ng-component"]],inputs:{contractId:[1,"contractId"],appointmentId:[1,"appointmentId"]},decls:5,vars:3,consts:[[1,"cancel-appointment__title"],["size","big"],[1,"cancel-appointment__error"],[1,"cancel-appointment__info"],[1,"cancel-appointment__info__label"],["matButton","filled",1,"cancel-appointment__button",3,"disabled"],[1,"cancel-appointment__cancelled"],["matButton","filled",3,"routerLink"],["matButton","filled",1,"cancel-appointment__button",3,"click","disabled"],["size","small",1,"cancel-appointment__button__spinner"]],template:function(e,r){if(e&1&&(c(0,"h1",0),a(1,"Confirmez l'annulation de votre rendez-vous"),o(),l(2,L,1,0,"montri-spinner",1),l(3,G,11,8),l(4,$,2,0,"p",2)),e&2){let s;i(2),m(r.appointmentResource.isLoading()?2:-1),i(),m((s=r.appointmentResource.hasValue()&&r.appointmentResource.value())?3:-1,s),i(),m(r.appointmentResource.error()?4:-1)}},dependencies:[N,O,z,D,P],styles:[".cancel-appointment__title[_ngcontent-%COMP%]{margin-bottom:30px}.cancel-appointment__info[_ngcontent-%COMP%]{margin-bottom:10px}.cancel-appointment__info__label[_ngcontent-%COMP%]{font-weight:600}.cancel-appointment__cancelled[_ngcontent-%COMP%]{margin:24px 0;font-weight:600}.cancel-appointment__button[_ngcontent-%COMP%]{--mat-button-filled-container-color: #d30000}.cancel-appointment__button__spinner[_ngcontent-%COMP%]{display:inline-flex;margin-left:8px;opacity:.4;position:relative;top:2px}.cancel-appointment__error[_ngcontent-%COMP%]{margin:40px auto;text-align:center;font-style:italic;color:#9c0000}"],changeDetection:0})};export{V as CancelAppointment};

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.