componenteshospitais 3.3.2 → 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 CHANGED
@@ -16436,7 +16436,10 @@ styleInject(css_248z);
16436
16436
 
16437
16437
  var FluxoProcesso = function (_a) {
16438
16438
  var _b = _a.activeDot, activeDot = _b === void 0 ? 1 : _b, _c = _a.inProgress, inProgress = _c === void 0 ? 2 : _c, textos = _a.textos, tableContent = _a.tableContent, onDotClick = _a.onDotClick;
16439
+ var _d = React.useState(false); _d[0]; var setTable = _d[1];
16440
+ var _e = React.useState(0); _e[0]; _e[1];
16439
16441
  React.useEffect(function () {
16442
+ setTable(false);
16440
16443
  }, [activeDot]);
16441
16444
  return (React.createElement("div", null,
16442
16445
  React.createElement("div", { className: styles.wrapper }, textos.map(function (texto, index) { return (React.createElement("div", { className: styles.stepWrapper, key: index },
@@ -16448,7 +16451,63 @@ var FluxoProcesso = function (_a) {
16448
16451
  React.createElement("div", { className: styles.textos }, texto))); })),
16449
16452
  tableContent.length > 0 && (React.createElement("div", null,
16450
16453
  React.createElement(TableStandard, { dados: tableContent, idColumn: "titulo", empresa: "1" })))));
16451
- };
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
+ */
16452
16511
 
16453
16512
  exports.Busca = Busca;
16454
16513
  exports.Button = Button;