test de déploiement du build depuis gitlab
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1 lines
5.3 KiB

import{o as e}from"./chunk-jRWAZmH_.js";import{n as t,t as n}from"./jsx-runtime-CEixWuwE.js";import{t as r}from"./select-dQ-XiIfN.js";import{n as i,t as a}from"./row-CaO7bYqu.js";import{r as o}from"./react-redux-Bek2gPun.js";import{t as s}from"./menu.queries-DYe2vnq9.js";import{I as c,Q as l,dt as u,ot as d}from"./index-C1mw6CgG.js";import{t as f}from"./SaveButton-BWNmkjLW.js";import{i as p}from"./users.mutations-CKeA39Fu.js";import{t as m}from"./ColorPicker-BYeWsagE.js";var h=e(t()),g=n(),{Option:_}=r,v={},y=()=>{let e=o(e=>e.cti.ui.primaryColor),t=s(),n=c(),y=p(),b=t.data??v,x=n.data?.session,S=n.data?.user.homePageDefaultModule,C=n.data?.user.showGraphs,w=n.data?.user.spreadsheetEditor,T=n.data?.user.spreadsheetSeparator,E=n.data?.user.pmsiDefaultModule,D=n.data?.user.expandedRows,O=x?.CONNECTEDUSER,k=D===`ouvert`,A=Object.values(b).filter(e=>{let t=e.name.toUpperCase();return t.includes(`PMSI`)||t.includes(`P.M.S.I`)}),[j,M]=(0,h.useState)(!1),[N]=d.useForm();return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`div`,{className:`page-header`,children:[(0,g.jsx)(`h1`,{className:`header-title`,children:`Options`}),(0,g.jsx)(`div`,{className:`header-actions`,children:(0,g.jsx)(f,{onClick:()=>{M(!1),N.submit()},disabled:!j||y.isPending,loading:y.isPending,toolTipTitle:`Enregistrer`})})]}),(0,g.jsx)(`div`,{className:`page-content`,style:{overflow:`scroll`},children:(0,g.jsxs)(d,{form:N,onValuesChange:()=>M(!0),onFinish:e=>{e.expandedRows=e.expandedRows===!0?`ouvert`:`fermé`,y.mutate({user:O,displaySettings:e},{onSuccess:()=>N.resetFields()})},initialValues:{pmsiDefaultModule:E,homePageDefaultModule:S,spreadsheetSeparator:T,spreadsheetEditor:w,showGraphs:C,primaryColor:e,expandedRows:k},children:[(0,g.jsxs)(`div`,{className:`options-section`,children:[(0,g.jsx)(`h2`,{className:`section-title`,children:`Paramètres d'affichage `}),(0,g.jsx)(u,{style:{marginTop:`0px`,marginBottom:`10px`}}),(0,g.jsxs)(`div`,{className:`section-body`,children:[(0,g.jsxs)(a,{children:[(0,g.jsx)(i,{span:4,children:(0,g.jsx)(`span`,{className:`first-label`,children:`Principale`})}),(0,g.jsx)(i,{span:6,children:(0,g.jsx)(d.Item,{name:`primaryColor`,valuePropName:`color`,getValueFromEvent:e=>e?.hex??null,className:`form-item-element`,children:(0,g.jsx)(m,{style:{right:`120px`,top:`24px`,position:`relative`}})})})]}),(0,g.jsxs)(a,{children:[(0,g.jsx)(i,{span:4,children:(0,g.jsx)(`span`,{className:`first-label`,children:`Affichage des graphiques `})}),(0,g.jsx)(d.Item,{name:`showGraphs`,className:`form-item-element`,children:(0,g.jsx)(r,{style:{width:160},options:[{value:`always`,label:`toujours`},{value:`hidden`,label:`masqués`},{value:`never`,label:`jamais`}]})})]})]})]}),(0,g.jsxs)(`div`,{className:`options-section-middle`,children:[(0,g.jsx)(`h2`,{className:`section-title`,children:`Paramètres de l'export EXCEL `}),(0,g.jsx)(u,{style:{marginTop:`0px`,marginBottom:`10px`}}),(0,g.jsxs)(`div`,{className:`section-body`,children:[(0,g.jsxs)(a,{children:[(0,g.jsx)(i,{span:4,children:(0,g.jsx)(`span`,{className:`first-label`,children:`Editeur CSV `})}),(0,g.jsx)(i,{span:6,children:(0,g.jsx)(d.Item,{name:`spreadsheetEditor`,className:`form-item-element`,children:(0,g.jsxs)(r,{style:{width:160},children:[(0,g.jsx)(_,{value:`EXCEL`,children:`Microsoft Excel`}),(0,g.jsx)(_,{value:`CSV`,children:`Open Office`})]})})})]}),(0,g.jsxs)(a,{children:[(0,g.jsx)(i,{span:4,children:(0,g.jsx)(`span`,{className:`first-label`,children:`Séparateur `})}),(0,g.jsx)(i,{span:6,children:(0,g.jsx)(d.Item,{name:`spreadsheetSeparator`,className:`form-item-element`,children:(0,g.jsxs)(r,{style:{width:80},children:[(0,g.jsx)(_,{value:`;`,children:`;`}),(0,g.jsx)(_,{value:`,`,children:`,`})]})})})]})]})]}),(0,g.jsxs)(`div`,{className:`options-section-middle`,children:[(0,g.jsx)(`h2`,{className:`section-title`,children:`Paramètres des menus `}),(0,g.jsx)(u,{style:{marginTop:`0px`,marginBottom:`10px`}}),(0,g.jsxs)(`div`,{className:`section-body`,children:[(0,g.jsxs)(a,{children:[(0,g.jsx)(i,{span:4,children:(0,g.jsx)(`span`,{className:`first-label`,children:`Module à ouvrir `})}),(0,g.jsx)(i,{span:6,children:(0,g.jsx)(d.Item,{name:`homePageDefaultModule`,className:`form-item-element`,children:(0,g.jsxs)(r,{style:{width:160},children:[(0,g.jsx)(_,{value:`accueil`,children:`Accueil`}),Object.values(b).map(({name:e,label:t})=>(0,g.jsx)(_,{value:e.toLowerCase(),children:t},e))]})})})]}),A.length>1?(0,g.jsxs)(a,{children:[(0,g.jsx)(i,{span:4,children:(0,g.jsx)(`span`,{className:`first-label`,children:`Module PMSI par défaut`})}),(0,g.jsx)(i,{span:6,children:(0,g.jsx)(d.Item,{name:`pmsiDefaultModule`,className:`form-item-element`,children:(0,g.jsx)(r,{style:{width:160},children:A.map(e=>(0,g.jsx)(_,{value:e.name.toLowerCase(),children:e.label},e.name))})})})]}):null]})]}),(0,g.jsxs)(`div`,{className:`options-section-middle`,children:[(0,g.jsx)(`h2`,{className:`section-title`,children:`Paramètres des Tableaux`}),(0,g.jsx)(u,{style:{marginTop:`0px`,marginBottom:`10px`}}),(0,g.jsx)(`div`,{className:`section-body`,children:(0,g.jsxs)(a,{children:[(0,g.jsx)(i,{span:4,children:(0,g.jsx)(`span`,{className:`first-label`,children:`Ouverture par défaut des regroupements`})}),(0,g.jsx)(i,{span:6,children:(0,g.jsx)(d.Item,{className:`form-item-element`,name:`expandedRows`,valuePropName:`checked`,children:(0,g.jsx)(l,{defaultChecked:k})})})]})})]})]})})]})};export{y as default};