Version initiale du site RSU pour le déploiement

This commit is contained in:
2026-09-01 10:59:19 +00:00
commit 74b6633250
513 changed files with 4681 additions and 0 deletions

View File

@@ -0,0 +1 @@
import{a as _}from"./chunk-SMVD5LRJ.js";import{a as T}from"./chunk-YEESETR2.js";import{c as E,d as N,e as F,f as L,g as W,h as j,p as A,r as I,t as D}from"./chunk-UDFQV3WY.js";import{e as M}from"./chunk-ZEULGWAI.js";import"./chunk-MBEC6LK4.js";import{Eb as i,Fa as s,Fb as C,Gb as v,Jb as m,Kb as u,Lb as p,M as l,Ta as h,Ya as b,ca as g,jb as f,kb as e,lb as t,mb as w,rb as y,rc as P,sb as x,xc as S}from"./chunk-TVKQFRWX.js";import"./chunk-DAQOROHW.js";function V(d,r){if(d&1&&(e(0,"div",17),i(1),t()),d&2){let a=x();s(),C(a.error())}}var q=class d{auth=l(_);api=l(T);router=l(M);currentPassword="";newPassword="";confirmation="";loading=g(!1);error=g("");submit(){if(this.error.set(""),!this.isStrongPassword(this.newPassword)){this.error.set("Le nouveau mot de passe ne respecte pas les crit\xE8res de s\xE9curit\xE9.");return}if(this.newPassword!==this.confirmation){this.error.set("La confirmation ne correspond pas au nouveau mot de passe.");return}let r=this.auth.currentUser()?.id;r&&(this.loading.set(!0),this.api.changePassword(r,this.currentPassword,this.newPassword).subscribe({next:()=>{this.auth.clearSession(),this.router.navigate(["/auth/login"],{queryParams:{passwordChanged:"1"}})},error:a=>{this.error.set(a.error?.message||"La modification du mot de passe a \xE9chou\xE9."),this.loading.set(!1)}}))}isStrongPassword(r){return r.length>=10&&/[A-Z]/.test(r)&&/[a-z]/.test(r)&&/\d/.test(r)&&/[^A-Za-z0-9]/.test(r)}static \u0275fac=function(a){return new(a||d)};static \u0275cmp=h({type:d,selectors:[["app-forced-password-change"]],decls:29,vars:6,consts:[[1,"relative","flex","min-h-screen","items-center","justify-center","overflow-hidden","bg-primary-950","px-5","py-12"],[1,"absolute","inset-0","bg-gradient-to-br","from-primary-950","via-primary-800","to-accent-700","opacity-95"],[1,"relative","w-full","max-w-lg","rounded-3xl","border","border-white/15","bg-white","p-8","shadow-2xl"],[1,"mx-auto","flex","h-20","w-24","items-center","justify-center","rounded-2xl","bg-white","p-2","shadow-lg"],["src","assets/images/rsu-logo.jpg","alt","Logo du RSU",1,"h-full","w-full","object-contain"],[1,"mt-6","text-center","text-xs","font-bold","uppercase","tracking-[.2em]","text-primary-700"],[1,"mt-2","text-center","text-2xl","font-bold","text-slate-900"],[1,"mt-3","text-center","text-sm","leading-6","text-slate-500"],["class","mt-6 rounded-xl border border-red-200 bg-red-50 p-4 text-sm text-red-700",4,"ngIf"],[1,"mt-7","space-y-5",3,"ngSubmit"],[1,"block"],[1,"text-sm","font-semibold","text-slate-700"],["type","password","name","currentPassword","required","","autocomplete","current-password",1,"input","mt-2","w-full",3,"ngModelChange","ngModel"],["type","password","name","newPassword","required","","minlength","10","autocomplete","new-password",1,"input","mt-2","w-full",3,"ngModelChange","ngModel"],["type","password","name","confirmation","required","","minlength","10","autocomplete","new-password",1,"input","mt-2","w-full",3,"ngModelChange","ngModel"],[1,"rounded-xl","bg-slate-50","p-4","text-xs","leading-5","text-slate-600"],["type","submit",1,"btn-primary","w-full","justify-center","disabled:opacity-60",3,"disabled"],[1,"mt-6","rounded-xl","border","border-red-200","bg-red-50","p-4","text-sm","text-red-700"]],template:function(a,n){a&1&&(e(0,"main",0),w(1,"div",1),e(2,"section",2)(3,"div",3),w(4,"img",4),t(),e(5,"p",5),i(6,"Premi\xE8re connexion"),t(),e(7,"h1",6),i(8,"Cr\xE9ez votre mot de passe personnel"),t(),e(9,"p",7),i(10,"Le mot de passe transmis par l\u2019Administrateur est temporaire. Vous devez le remplacer avant d\u2019acc\xE9der \xE0 l\u2019administration."),t(),b(11,V,2,1,"div",8),e(12,"form",9),y("ngSubmit",function(){return n.submit()}),e(13,"label",10)(14,"span",11),i(15,"Mot de passe temporaire"),t(),e(16,"input",12),p("ngModelChange",function(o){return u(n.currentPassword,o)||(n.currentPassword=o),o}),t()(),e(17,"label",10)(18,"span",11),i(19,"Nouveau mot de passe"),t(),e(20,"input",13),p("ngModelChange",function(o){return u(n.newPassword,o)||(n.newPassword=o),o}),t()(),e(21,"label",10)(22,"span",11),i(23,"Confirmer le nouveau mot de passe"),t(),e(24,"input",14),p("ngModelChange",function(o){return u(n.confirmation,o)||(n.confirmation=o),o}),t()(),e(25,"div",15),i(26,"Au moins 10 caract\xE8res avec une majuscule, une minuscule, un chiffre et un caract\xE8re sp\xE9cial."),t(),e(27,"button",16),i(28),t()()()()),a&2&&(s(11),f("ngIf",n.error()),s(5),m("ngModel",n.currentPassword),s(4),m("ngModel",n.newPassword),s(4),m("ngModel",n.confirmation),s(3),f("disabled",n.loading()),s(),v(" ",n.loading()?"Modification en cours\u2026":"Enregistrer mon mot de passe"," "))},dependencies:[S,P,D,j,E,N,F,A,I,W,L],encapsulation:2})};export{q as ForcedPasswordChangeComponent};