ultisuite-client/out/_next/static/chunks/1754-ff6f77b12b0ac0f5.js
R3D347HR4Y d6d18f911b
Some checks failed
E2E / Playwright e2e (push) Has been cancelled
Lots of stuff and mobile app
2026-06-17 00:13:28 +02:00

1 line
10 KiB
JavaScript

"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1754],{4559:(e,t,n)=>{n.d(t,{$B:()=>x,Dk:()=>N,EE:()=>F,Es:()=>y,FZ:()=>u,G6:()=>s,HQ:()=>g,Kh:()=>c,MB:()=>K,My:()=>_,P2:()=>Q,U4:()=>m,Ve:()=>j,_K:()=>h,bl:()=>U,cE:()=>M,dc:()=>E,eS:()=>w,h2:()=>l,hF:()=>v,hs:()=>C,iF:()=>A,iX:()=>R,jS:()=>f,n5:()=>I,oP:()=>$,u:()=>k,ug:()=>p,w2:()=>q,x6:()=>b,xV:()=>d,yJ:()=>S});var r=n(98306),i=n(39927),o=n(17745),a=n(94927);function s(){return(0,r.I)({queryKey:["admin","mail","domains"],queryFn:()=>a.uE.get("/admin/mail/domains")})}function u(){let e=(0,i.jE)();return(0,o.n)({mutationFn:e=>a.uE.post("/admin/mail/domains",e),onSuccess:()=>{e.invalidateQueries({queryKey:["admin","mail","domains"]})}})}function m(e){let t=(0,i.jE)();return(0,o.n)({mutationFn:()=>a.uE.post(`/admin/mail/domains/${e}/verify-txt`),onSuccess:()=>{t.invalidateQueries({queryKey:["admin","mail","domains"]})}})}function d(e){let t=(0,i.jE)();return(0,o.n)({mutationFn:()=>a.uE.post(`/admin/mail/domains/${e}/verify-mx`),onSuccess:()=>{t.invalidateQueries({queryKey:["admin","mail","domains"]})}})}function c(){return(0,r.I)({queryKey:["admin","migration","projects"],queryFn:()=>a.uE.get("/admin/migration/projects")})}function l(){let e=(0,i.jE)();return(0,o.n)({mutationFn:e=>a.uE.post("/admin/migration/projects",e),onSuccess:()=>{e.invalidateQueries({queryKey:["admin","migration","projects"]})}})}function p(){let e=(0,i.jE)();return(0,o.n)({mutationFn:e=>a.uE.post(`/admin/migration/projects/${e}/activate`),onSuccess:()=>{e.invalidateQueries({queryKey:["admin","migration","projects"]})}})}function g(){let e=(0,i.jE)();return(0,o.n)({mutationFn:e=>a.uE.post(`/admin/migration/projects/${e}/cutover`),onSuccess:()=>{e.invalidateQueries({queryKey:["admin","migration","projects"]})}})}function y(e){return(0,r.I)({queryKey:["admin","migration","projects",e,"cutover-dns"],enabled:!!e,queryFn:()=>a.uE.get(`/admin/migration/projects/${e}/cutover-dns`)})}function j(e){return(0,o.n)({mutationFn:t=>a.uE.post(`/admin/migration/projects/${e}/invites`,t)})}function f(e){let t=(0,i.jE)();return(0,o.n)({mutationFn:t=>a.uE.post(`/admin/migration/projects/${e}/invites/import`,{emails:t}),onSuccess:()=>{t.invalidateQueries({queryKey:["admin","migration","projects"]})},meta:{requiresProjectId:e}})}function v(e,t=!0){return(0,r.I)({queryKey:["admin","migration","projects",e,"roster"],enabled:!!e&&t,queryFn:()=>a.uE.get(`/admin/migration/projects/${e}/roster`)})}function h(e){let t=(0,i.jE)();return(0,o.n)({mutationFn:t=>a.uE.post(`/admin/migration/projects/${e}/roster`,{csv:t}),onSuccess:()=>{t.invalidateQueries({queryKey:["admin","migration","projects",e,"roster"]})},meta:{requiresProjectId:e}})}function E(e,t=!0){return(0,r.I)({queryKey:["admin","migration","projects",e,"jobs"],enabled:!!e&&t,queryFn:()=>a.uE.get(`/admin/migration/projects/${e}/jobs`),refetchInterval:1e4})}function q(e,t){return(0,r.I)({queryKey:["admin","migration","projects",e,"jobs",t,"audit","summary"],enabled:!!(e&&t),queryFn:()=>a.uE.get(`/admin/migration/projects/${e}/jobs/${t}/audit/summary`),refetchInterval:1e4})}function _(e,t,n="failed"){let i="all"===n?"":n;return(0,r.I)({queryKey:["admin","migration","projects",e,"jobs",t,"audit",n],enabled:!!(e&&t),queryFn:()=>{let n=new URLSearchParams({page_size:"50"});return i&&n.set("status",i),a.uE.get(`/admin/migration/projects/${e}/jobs/${t}/audit?${n.toString()}`)},refetchInterval:1e4})}async function b(e,t,n){let r=await a.uE.getBlob(`/admin/migration/projects/${e}/jobs/${t}/audit/export?format=${n}`),i=URL.createObjectURL(r),o=document.createElement("a");o.href=i,o.download=`migration-job-audit-${t.slice(0,8)}.${"csv"===n?"csv":"ndjson"}`,o.click(),URL.revokeObjectURL(i)}function x(e){let t=(0,i.jE)();return(0,o.n)({mutationFn:t=>a.uE.patch(`/admin/migration/projects/${e}/shared-drive-mode`,{shared_drive_mode:t}),onSuccess:()=>{t.invalidateQueries({queryKey:["admin","migration","projects"]}),t.invalidateQueries({queryKey:["admin","migration","projects",e,"shared-drives"]})}})}function $(e,t=!0){return(0,r.I)({queryKey:["admin","migration","projects",e,"shared-drives"],enabled:!!e&&t,queryFn:()=>a.uE.get(`/admin/migration/projects/${e}/shared-drives`),refetchInterval:15e3})}function F(e){let t=(0,i.jE)();return(0,o.n)({mutationFn:t=>a.uE.post(`/admin/migration/projects/${e}/shared-drives/${encodeURIComponent(t)}/approve`),onSuccess:()=>{t.invalidateQueries({queryKey:["admin","migration","projects",e,"shared-drives"]})}})}function K(e){let t=(0,i.jE)();return(0,o.n)({mutationFn:t=>a.uE.post(`/admin/migration/projects/${e}/shared-drives/${encodeURIComponent(t)}/reject`),onSuccess:()=>{t.invalidateQueries({queryKey:["admin","migration","projects",e,"shared-drives"]})}})}function I(e){let t=(0,i.jE)();return(0,o.n)({mutationFn:t=>a.uE.post(`/admin/migration/projects/${e}/jobs/${t}/retry`),onSuccess:()=>{t.invalidateQueries({queryKey:["admin","migration","projects",e,"jobs"]})}})}function S(e){let t=(0,i.jE)();return(0,o.n)({mutationFn:t=>a.uE.post(`/admin/migration/projects/${e}/jobs/${t}/reset-cursor`),onSuccess:()=>{t.invalidateQueries({queryKey:["admin","migration","projects",e,"jobs"]})}})}function Q(e){let t=(0,i.jE)();return(0,o.n)({mutationFn:()=>a.uE.post(`/admin/migration/projects/${e}/jobs/retry-failed`),onSuccess:()=>{t.invalidateQueries({queryKey:["admin","migration","projects",e,"jobs"]})}})}function w(){return(0,o.n)({mutationFn:e=>{let t=new URLSearchParams;e.tenant?.trim()&&t.set("tenant",e.tenant.trim()),e.projectId&&t.set("project_id",e.projectId);let n=t.toString();return a.uE.get(`/admin/migration/microsoft/admin-consent-url${n?`?${n}`:""}`)}})}function U(e){return(0,r.I)({queryKey:["migration","invite",e],enabled:!!e,queryFn:()=>a.uE.get(`/migration/invite?token=${encodeURIComponent(e??"")}`)})}function R(){return(0,r.I)({queryKey:["migration","status"],queryFn:()=>a.uE.get("/migration/status")})}function k(){let e=(0,i.jE)();return(0,o.n)({mutationFn:e=>a.uE.post("/migration/claim",e),onSuccess:()=>{e.invalidateQueries({queryKey:["migration"]})}})}function N(){return(0,o.n)({mutationFn:e=>a.uE.post("/migration/oauth/start",e)})}function C(e,t){return(0,r.I)({queryKey:["mail","address-check",e,t],enabled:e.length>0&&t.length>0,queryFn:()=>a.uE.get(`/mail/addresses/check?local=${encodeURIComponent(e)}&domain=${encodeURIComponent(t)}`)})}function M(){return(0,r.I)({queryKey:["mail","hosted","status"],queryFn:()=>a.uE.get("/mail/hosted/status")})}function A(){let e=(0,i.jE)();return(0,o.n)({mutationFn:e=>a.uE.post("/mail/hosted/setup",e),onSuccess:()=>{e.invalidateQueries({queryKey:["mail","hosted","status"]}),e.invalidateQueries({queryKey:["accounts"]}),e.invalidateQueries({queryKey:["identities"]})}})}},6224:(e,t,n)=>{n.d(t,{g:()=>i});var r=n(19984);function i(){let e=(0,r.usePathname)();return"/demo"===e||e.startsWith("/demo/")}},18747:(e,t,n)=>{n.d(t,{v:()=>a});var r=n(91356),i=n(86227),o=n(6224);function a(){let e=(0,o.g)(),[t,n]=(0,r.useState)(!1),a=(0,i.nc)(e=>e.isAuthenticated());return(0,r.useEffect)(()=>e||i.nc.persist.hasHydrated()?void n(!0):i.nc.persist.onFinishHydration(()=>n(!0)),[e]),{ready:!!e||t,authenticated:!!e||t&&a}}},99856:(e,t,n)=>{n.d(t,{Es:()=>m,RU:()=>s,Ri:()=>u,Uz:()=>o,q6:()=>a});var r=n(4208);let i={project_not_activated:"Votre administrateur doit activer le projet de migration avant que l'import ne d\xe9marre. Vos jobs resteront en attente jusqu'\xe0 cette activation."};function o(e){return e?.auth_mode==="google_dwd"||e?.auth_mode==="microsoft_app"}function a(e){return e?.auth_mode==="microsoft_app"?"Import automatique (app Microsoft)":e?.auth_mode==="google_dwd"?"Import automatique (compte de service)":"Autoriser l'import Google / Microsoft"}function s({steps:e}){return(0,r.jsx)("ol",{className:"space-y-2 text-sm",children:e.map(e=>(0,r.jsxs)("li",{className:`flex items-center gap-2 rounded-md px-3 py-2 ${e.current?"bg-primary/10 font-medium":e.done?"text-muted-foreground":""}`,children:[(0,r.jsx)("span",{className:`inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-xs ${e.done?"bg-green-600 text-white":e.current?"border-2 border-primary text-primary":"border border-muted-foreground/40 text-muted-foreground"}`,children:e.done?"✓":"\xb7"}),e.label]},e.label))})}function u({project:e,onboarding:t}){var n;return t?(0,r.jsxs)("div",{className:"mt-4 space-y-3",children:[t.waiting_for_admin&&(0,r.jsx)("p",{className:"rounded-md bg-amber-500/10 px-3 py-2 text-sm text-amber-800",children:(n=t.waiting_reason)?i[n]??"En attente d'une action administrateur.":"En attente d'une action administrateur avant le d\xe9marrage de l'import."}),o(e)&&!t.waiting_for_admin&&(0,r.jsx)("p",{className:"rounded-md bg-blue-500/10 px-3 py-2 text-sm text-blue-800",children:e?.auth_mode==="microsoft_app"?(0,r.jsx)(r.Fragment,{children:"Import Microsoft 365 configur\xe9 par votre administrateur (authentification app-only). Aucune autorisation OAuth personnelle requise — l'import d\xe9marre automatiquement une fois le projet actif et le consentement admin accord\xe9."}):(0,r.jsx)(r.Fragment,{children:"Import Google configur\xe9 par votre administrateur (compte de service). Aucune autorisation OAuth personnelle requise — l'import d\xe9marre automatiquement une fois le projet actif."})}),t.needs_microsoft_admin_consent&&e?.source_provider==="microsoft"&&(0,r.jsxs)("p",{className:"rounded-md bg-amber-500/10 px-3 py-2 text-sm text-amber-800",children:["L'administrateur de votre organisation Microsoft 365 doit accorder le consentement admin \xe0 l'application Ultimail",e?.auth_mode==="microsoft_app"?" (permissions application : Mail, Calendrier, Contacts, OneDrive).":"."," ",e?.auth_mode!=="microsoft_app"&&"Vous pouvez autoriser votre compte personnel ci-dessous, mais l'import organisationnel peut \xe9chouer tant que ce consentement n'est pas fait."]}),t.needs_user_oauth&&!t.has_migration_credentials&&!t.waiting_for_admin&&!o(e)&&(0,r.jsxs)("p",{className:"rounded-md border px-3 py-2 text-sm text-muted-foreground",children:["\xc9tape suivante : autorisez l'acc\xe8s \xe0 votre compte"," ",e?.source_provider==="microsoft"?"Microsoft 365":"Google Workspace","pour lancer l'import de vos donn\xe9es."]}),t.has_migration_credentials&&!t.waiting_for_admin&&(0,r.jsx)("p",{className:"rounded-md bg-green-500/10 px-3 py-2 text-sm text-green-700",children:"Autorisation enregistr\xe9e — l'import progresse en arri\xe8re-plan."})]}):null}function m(e,t,n){return!(!e||!t||o(e))&&!t.waiting_for_admin&&e.source_provider===n&&!t.has_migration_credentials&&t.needs_user_oauth}}}]);