summaryrefslogtreecommitdiffstats
path: root/front/odiparpack/app/components
diff options
context:
space:
mode:
authorDayana31 <[email protected]>2022-06-06 18:22:06 -0500
committerDayana31 <[email protected]>2022-06-06 18:22:06 -0500
commitc10432bd66dfbf040662e9c8203956ac3614f4ca (patch)
tree88c739cdb9650408458ee300ca03a7fc7746cb9b /front/odiparpack/app/components
parentf3c1a8c5dcc3c482205f34332a9d673b35b4cfb0 (diff)
parentfab7d63333b86b9fe0f1c52d2c642b52bbf506c0 (diff)
downloadDP1_project-c10432bd66dfbf040662e9c8203956ac3614f4ca.tar.gz
DP1_project-c10432bd66dfbf040662e9c8203956ac3614f4ca.tar.bz2
DP1_project-c10432bd66dfbf040662e9c8203956ac3614f4ca.zip
Merge branch 'gabshr' into dayana
Diffstat (limited to 'front/odiparpack/app/components')
-rw-r--r--front/odiparpack/app/components/Tables/CrudTableForm.js15
-rw-r--r--front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js2
2 files changed, 13 insertions, 4 deletions
diff --git a/front/odiparpack/app/components/Tables/CrudTableForm.js b/front/odiparpack/app/components/Tables/CrudTableForm.js
index 017a3fc..5e99280 100644
--- a/front/odiparpack/app/components/Tables/CrudTableForm.js
+++ b/front/odiparpack/app/components/Tables/CrudTableForm.js
@@ -15,21 +15,30 @@ class CrudTableForm extends React.Component {
this.props.fetchData(this.props.dataInit, this.props.branch);
}
}
+
+ renderData(){
+ this.props.dispatch(this.props.getDataAPI()).then((res) => {
+ if (res) {
+ this.props.fetchData(res.data, this.props.branch);
+ }
+ })
+ }6
+
sendValues = (values) => {
setTimeout(() => {
this.props.submit(values, this.props.branch);
}, 500);
if (this.props.editingId === this.props.initValues.get('id')) {
- this.props.dispatch(this.props.editRowAPI()).then((res) => {
+ this.props.dispatch(this.props.editRowAPI(values)).then((res) => {
if (res) {
console.log("EDIT RO ", res)
}
})
} else {
- this.props.dispatch(this.props.addNewAPI()).then((res) => {
+ this.props.dispatch(this.props.addNewAPI(values)).then((res) => {
if (res) {
- console.log("ADD NEW FORM ", res)
+ this.renderData();
}
})
}
diff --git a/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js b/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js
index f6be3fd..5e58ca7 100644
--- a/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js
+++ b/front/odiparpack/app/components/Tables/tableParts/RowReadOnly.js
@@ -29,7 +29,7 @@ class RowReadOnly extends React.Component {
} = this.props;
const eventDel = () => {
removeRow(item, branch);
- this.props.dispatch(removeRowAPI()).then((res) => {
+ this.props.dispatch(removeRowAPI(item.get('id'))).then((res) => {
if (res) {
console.log("REMOVE READ ONLY ", res)
}