componenteshospitais 3.4.5 → 3.4.6
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 +3 -3
- package/dist/esm/index.js +3 -3
- package/package.json +1 -1
- package/src/components/ActionBar.tsx +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -16583,12 +16583,12 @@ var ActionBar = function (_a) {
|
|
|
16583
16583
|
{ icon: React.createElement(TfiHelp, { className: styles.actionBoxIcon }), active: showHelp, function: helpFunction, title: 'Preciso de Ajuda', id: 9 }
|
|
16584
16584
|
];
|
|
16585
16585
|
var handleClick = function (item) {
|
|
16586
|
-
// Quando clicar no botão de editar, atualiza o estado para desativar todos os botões, exceto o de salvar e de voltar
|
|
16586
|
+
// Quando clicar no botão de editar ou novo, atualiza o estado para desativar todos os botões, exceto o de salvar e de voltar
|
|
16587
16587
|
// Quando clicar no de voltar, habilita os outros botoes novamente e bloqueia o de salvar e voltar
|
|
16588
16588
|
if (item.active) {
|
|
16589
16589
|
var newState_1 = {};
|
|
16590
16590
|
dataButtonsLeft.forEach(function (btn) {
|
|
16591
|
-
if (item.id === 2) { // editando
|
|
16591
|
+
if (item.id === 1 || item.id === 2) { // editando e adicionando novo
|
|
16592
16592
|
newState_1[btn.id] = btn.id === 4 || btn.id === 5;
|
|
16593
16593
|
}
|
|
16594
16594
|
else { // voltar
|
|
@@ -16596,7 +16596,7 @@ var ActionBar = function (_a) {
|
|
|
16596
16596
|
}
|
|
16597
16597
|
});
|
|
16598
16598
|
// bloqueia o campo de permissoes
|
|
16599
|
-
if (item.id === 2) {
|
|
16599
|
+
if (item.id === 1 || item.id === 2) {
|
|
16600
16600
|
dataButtonsRight.forEach(function (btn) {
|
|
16601
16601
|
newState_1[btn.id] = btn.id === 9;
|
|
16602
16602
|
});
|
package/dist/esm/index.js
CHANGED
|
@@ -16581,12 +16581,12 @@ var ActionBar = function (_a) {
|
|
|
16581
16581
|
{ icon: React.createElement(TfiHelp, { className: styles.actionBoxIcon }), active: showHelp, function: helpFunction, title: 'Preciso de Ajuda', id: 9 }
|
|
16582
16582
|
];
|
|
16583
16583
|
var handleClick = function (item) {
|
|
16584
|
-
// Quando clicar no botão de editar, atualiza o estado para desativar todos os botões, exceto o de salvar e de voltar
|
|
16584
|
+
// Quando clicar no botão de editar ou novo, atualiza o estado para desativar todos os botões, exceto o de salvar e de voltar
|
|
16585
16585
|
// Quando clicar no de voltar, habilita os outros botoes novamente e bloqueia o de salvar e voltar
|
|
16586
16586
|
if (item.active) {
|
|
16587
16587
|
var newState_1 = {};
|
|
16588
16588
|
dataButtonsLeft.forEach(function (btn) {
|
|
16589
|
-
if (item.id === 2) { // editando
|
|
16589
|
+
if (item.id === 1 || item.id === 2) { // editando e adicionando novo
|
|
16590
16590
|
newState_1[btn.id] = btn.id === 4 || btn.id === 5;
|
|
16591
16591
|
}
|
|
16592
16592
|
else { // voltar
|
|
@@ -16594,7 +16594,7 @@ var ActionBar = function (_a) {
|
|
|
16594
16594
|
}
|
|
16595
16595
|
});
|
|
16596
16596
|
// bloqueia o campo de permissoes
|
|
16597
|
-
if (item.id === 2) {
|
|
16597
|
+
if (item.id === 1 || item.id === 2) {
|
|
16598
16598
|
dataButtonsRight.forEach(function (btn) {
|
|
16599
16599
|
newState_1[btn.id] = btn.id === 9;
|
|
16600
16600
|
});
|
package/package.json
CHANGED
|
@@ -77,12 +77,12 @@ const ActionBar: React.FC<ActionBarProps> = ({
|
|
|
77
77
|
];
|
|
78
78
|
|
|
79
79
|
const handleClick = (item: Button) => {
|
|
80
|
-
// Quando clicar no botão de editar, atualiza o estado para desativar todos os botões, exceto o de salvar e de voltar
|
|
80
|
+
// Quando clicar no botão de editar ou novo, atualiza o estado para desativar todos os botões, exceto o de salvar e de voltar
|
|
81
81
|
// Quando clicar no de voltar, habilita os outros botoes novamente e bloqueia o de salvar e voltar
|
|
82
82
|
if(item.active){
|
|
83
83
|
const newState: ButtonStates = {};
|
|
84
84
|
dataButtonsLeft.forEach((btn) => {
|
|
85
|
-
if(item.id === 2){ // editando
|
|
85
|
+
if(item.id === 1 || item.id === 2){ // editando e adicionando novo
|
|
86
86
|
newState[btn.id] = btn.id === 4 || btn.id === 5;
|
|
87
87
|
}else{ // voltar
|
|
88
88
|
newState[btn.id] = btn.id !== 4 && btn.id !== 5;
|
|
@@ -90,7 +90,7 @@ const ActionBar: React.FC<ActionBarProps> = ({
|
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
// bloqueia o campo de permissoes
|
|
93
|
-
if(item.id === 2){
|
|
93
|
+
if(item.id === 1 || item.id === 2){
|
|
94
94
|
dataButtonsRight.forEach((btn) => {
|
|
95
95
|
newState[btn.id] = btn.id === 9;
|
|
96
96
|
});
|