componenteshospitais 3.3.3 → 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +57 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +57 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/FluxoProcesso.tsx +58 -1
package/dist/cjs/index.js
CHANGED
|
@@ -16451,7 +16451,63 @@ var FluxoProcesso = function (_a) {
|
|
|
16451
16451
|
React.createElement("div", { className: styles.textos }, texto))); })),
|
|
16452
16452
|
tableContent.length > 0 && (React.createElement("div", null,
|
|
16453
16453
|
React.createElement(TableStandard, { dados: tableContent, idColumn: "titulo", empresa: "1" })))));
|
|
16454
|
-
};
|
|
16454
|
+
};
|
|
16455
|
+
/*
|
|
16456
|
+
|
|
16457
|
+
import { FluxoProcessos } from 'componenteshospitais';
|
|
16458
|
+
|
|
16459
|
+
const [activeDot, setActiveDot] = useState(4);
|
|
16460
|
+
const [inProgress, setinProgress] = useState(5);
|
|
16461
|
+
const [listaContent, setListaContent] = useState([{}]);
|
|
16462
|
+
const [openedDot, setOpenedDot] = useState<number | null>(null);
|
|
16463
|
+
|
|
16464
|
+
let textos = [
|
|
16465
|
+
'Solicitado',
|
|
16466
|
+
'Aprovado',
|
|
16467
|
+
'Avaliação final contratual',
|
|
16468
|
+
'Autorização',
|
|
16469
|
+
'Contratação',
|
|
16470
|
+
];
|
|
16471
|
+
|
|
16472
|
+
//Funcao responsavel por alterar o conteudo da lista de acordo com o clicado
|
|
16473
|
+
const handleDotClick = (id: number) => {
|
|
16474
|
+
if (openedDot === id) {
|
|
16475
|
+
setListaContent([]);
|
|
16476
|
+
setOpenedDot(null);
|
|
16477
|
+
} else {
|
|
16478
|
+
setOpenedDot(id);
|
|
16479
|
+
if (id === 1) {
|
|
16480
|
+
setListaContent([
|
|
16481
|
+
{ titulo: 'Solicitado' },
|
|
16482
|
+
]);
|
|
16483
|
+
} else if (id === 2 && id < inProgress) {
|
|
16484
|
+
setListaContent([
|
|
16485
|
+
{ titulo: 'Aprovado' },
|
|
16486
|
+
]);
|
|
16487
|
+
} else if (id === 3 && id < inProgress) {
|
|
16488
|
+
setListaContent([
|
|
16489
|
+
{ titulo: 'Avaliação final contratual' },
|
|
16490
|
+
]);
|
|
16491
|
+
} else if (id === 4 && id < inProgress) {
|
|
16492
|
+
setListaContent([
|
|
16493
|
+
{ titulo: 'Autorização' },
|
|
16494
|
+
]);
|
|
16495
|
+
} else if (id === 5 && id < inProgress) {
|
|
16496
|
+
setListaContent([
|
|
16497
|
+
{ titulo: 'Contratação' },
|
|
16498
|
+
]);
|
|
16499
|
+
}
|
|
16500
|
+
}
|
|
16501
|
+
};
|
|
16502
|
+
|
|
16503
|
+
|
|
16504
|
+
//Chamada do componente
|
|
16505
|
+
|
|
16506
|
+
<div style={{width: '750px'}}> //Definição do tamanho de acordo com o necessário
|
|
16507
|
+
<FluxoProcessos activeDot={activeDot} inProgress={inProgress} textos={textos} tableContent={listaContent} onDotClick={handleDotClick} />
|
|
16508
|
+
</div>
|
|
16509
|
+
|
|
16510
|
+
*/
|
|
16455
16511
|
|
|
16456
16512
|
exports.Busca = Busca;
|
|
16457
16513
|
exports.Button = Button;
|