PageSourceSearch

https://app.djoubo.eu/assets/ProfileSettings-DSk23D6A.js

js djoubo.eu collected 2026-10-02 01:55:14 UTC 4,309 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-maps-BinVss3u.js";import{r as a}from"./vendor-react-CL3VIz2f.js";import{e as h,J as p,G as o,n as u,r as x}from"./index-BUnNshJS.js";import{u as v}from"./vendor-i18n-DT4UeBBY.js";import"./vendor-utils-CyyXNMuU.js";import"./vendor-state-B-LfYkwK.js";import"./vendor-antd-lHkVxrW4.js";import"./vendor-forms-C1BFdZKp.js";import"./vendor-phone-DJv9vbhJ.js";import"./vendor-animation-Bfx_LFm5.js";import"./vendor-realtime-DKMORxsZ.js";const j=async()=>{const{data:s}=await h.get(p.settings);return{data:s?.data??s}},f=async s=>{const{data:n}=await h.patch(p.settings,s);return{data:n?.data??n}},y=()=>e.jsx("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"15 18 9 12 15 6"})}),N=()=>e.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("polyline",{points:"9 11 12 14 22 4"}),e.jsx("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]}),k=()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),e.jsx("circle",{cx:"9",cy:"7",r:"4"}),e.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75"})]}),b=()=>e.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("rect",{x:"2",y:"7",width:"20",height:"14",rx:"2",ry:"2"}),e.jsx("path",{d:"M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"})]}),S=[{value:"driver_self",labelKey:"enterprise.settings.ride_assignment_mode_driver_self",descKey:"enterprise.settings.ride_assignment_mode_driver_self_desc",Icon:k},{value:"company_assign",labelKey:"enterprise.settings.ride_assignment_mode_company_assign",descKey:"enterprise.settings.ride_assignment_mode_company_assign_desc",Icon:b}],D=()=>{const{t:s}=v(),[n,r]=a.useState(!0),[c,l]=a.useState(!1),[d,m]=a.useState("driver_self");a.useEffect(()=>{let t=!1;return r(!0),j().then(({data:i})=>{!t&&i.ride_assignment_mode&&m(i.ride_assignment_mode)}).catch(()=>{t||o.error(s("enterprise.settings_load_error"))}).finally(()=>{t||r(!1)}),()=>{t=!0}},[s]);const _=()=>{l(!0),f({ride_assignment_mode:d}).then(()=>o.success(s("enterprise.settings_saved"))).catch(()=>o.error(s("enterprise.settings_save_error"))).finally(()=>l(!1))};return e.jsx("section",{id:"ent-settings",children:e.jsxs("div",{className:"st-frame",children:[e.jsxs("div",{className:"st-header",children:[e.jsx("button",{type:"button",className:"st-back-btn",onClick:()=>u(x.enterprise.profile.index,{replace:!0}),"aria-label":s("common.back"),children:e.jsx(y,{})}),e.jsx("h1",{className:"st-title",children:s("enterprise.settings_ride_assignment")})]}),e.jsx("div",{className:"st-body",children:n?e.jsx("div",{className:"st-loading",children:s("common.loading")}):e.jsxs("div",{className:"st-section",children:[e.jsxs("div",{className:"st-section__head",children:[e.jsx("span",{className:"st-section__icon",children:e.jsx(N,{})}),e.jsx("h2",{className:"st-section__title",children:s("enterprise.settings.ride_assignment_mode_label")})]}),e.jsx("div",{className:"st-options",role:"radiogroup","aria-label":s("enterprise.settings.ride_assignment_mode_label"),children:S.map(t=>{const i=d===t.value,g=t.Icon;return e.jsxs("label",{className:`st-option${i?" st-option--checked":""}`,children:[e.jsx("input",{type:"radio",name:"ride_assignment_mode",value:t.value,checked:i,onChange:()=>m(t.value)}),e.jsx("span",{className:"st-option__icon",children:e.jsx(g,{})}),e.jsxs("span",{className:"st-option__content",children:[e.jsx("span",{className:"st-option__label",children:s(t.labelKey)}),e.jsx("span",{className:"st-option__desc",children:s(t.descKey)})]}),e.jsx("span",{className:`st-option__radio${i?" checked":""}`,"aria-hidden":"true"})]},t.value)})})]})}),!n&&e.jsx("div",{className:"st-actions",children:e.jsx("button",{type:"button",className:"st-btn-submit",onClick:_,disabled:c,
1children:s(c?"common.saving":"enterprise.settings_save")})})]})})};export{D as default};

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.