componenteshospitais 3.3.3 → 3.3.5

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
@@ -16349,9 +16349,9 @@ var styles$1 = {"tableContainer":"tableStandard-module_tableContainer__W2g84","t
16349
16349
  styleInject(css_248z$1);
16350
16350
 
16351
16351
  var TableStandard = function (_a) {
16352
- var dados = _a.dados, onRowClick = _a.onRowClick, _b = _a.idColumn, idColumn = _b === void 0 ? 'id' : _b, onActionClick = _a.onActionClick, onDownloadClick = _a.onDownloadClick, onViewClick = _a.onViewClick, _c = _a.showActionColumn, showActionColumn = _c === void 0 ? false : _c, _d = _a.showDownloadButton, showDownloadButton = _d === void 0 ? false : _d, _e = _a.showExcelDownloadButton, showExcelDownloadButton = _e === void 0 ? false : _e, _f = _a.showViewButton, showViewButton = _f === void 0 ? false : _f, _g = _a.cor, cor = _g === void 0 ? false : _g, _h = _a.numeroPaginas, numeroPaginas = _h === void 0 ? 10 : _h, empresa = _a.empresa;
16353
- var _j = React.useState(null), selectedRow = _j[0], setSelectedRow = _j[1];
16354
- var _k = React.useState(1), currentPage = _k[0], setCurrentPage = _k[1];
16352
+ var dados = _a.dados, onRowClick = _a.onRowClick, _b = _a.idColumn, idColumn = _b === void 0 ? 'id' : _b, onActionClick = _a.onActionClick, onDownloadClick = _a.onDownloadClick, onViewClick = _a.onViewClick, _c = _a.showActionColumn, showActionColumn = _c === void 0 ? false : _c, _d = _a.showDownloadButton, showDownloadButton = _d === void 0 ? false : _d, _e = _a.showExcelDownloadButton, showExcelDownloadButton = _e === void 0 ? false : _e, _f = _a.showViewButton, showViewButton = _f === void 0 ? false : _f, _g = _a.cor, cor = _g === void 0 ? false : _g, _h = _a.numeroPaginas, numeroPaginas = _h === void 0 ? 10 : _h, empresa = _a.empresa, _j = _a.paginacao, paginacao = _j === void 0 ? true : _j;
16353
+ var _k = React.useState(null), selectedRow = _k[0], setSelectedRow = _k[1];
16354
+ var _l = React.useState(1), currentPage = _l[0], setCurrentPage = _l[1];
16355
16355
  var ultimoItem = currentPage * numeroPaginas;
16356
16356
  var primeiroItem = ultimoItem - numeroPaginas;
16357
16357
  var currentItems = dados.slice(primeiroItem, ultimoItem);
@@ -16411,7 +16411,7 @@ var TableStandard = function (_a) {
16411
16411
  onViewClick(row[idColumn]);
16412
16412
  }, className: styles$1.actionButton, title: 'Visualizar' },
16413
16413
  React.createElement(FaEye, null)))))))); }))),
16414
- React.createElement("div", { className: "".concat(empresaClass, " ").concat(styles$1.pagination) }, pageNumbers.map(function (number) { return (React.createElement("button", { key: number, onClick: function () { return setCurrentPage(number); }, className: "".concat(styles$1.pageButton, " ").concat(currentPage === number ? styles$1.activePage : '') }, number)); }))));
16414
+ paginacao === true && (React.createElement("div", { className: "".concat(empresaClass, " ").concat(styles$1.pagination) }, pageNumbers.map(function (number) { return (React.createElement("button", { key: number, onClick: function () { return setCurrentPage(number); }, className: "".concat(styles$1.pageButton, " ").concat(currentPage === number ? styles$1.activePage : '') }, number)); })))));
16415
16415
  };
16416
16416
 
16417
16417
  var TextAreaField = function (_a) {
@@ -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;