re fetch products after succesfull delete
This commit is contained in:
parent
776efdd2ad
commit
f7c2b15c46
|
@ -121,12 +121,14 @@ export default {
|
||||||
icon: 'el-icon-circle-check',
|
icon: 'el-icon-circle-check',
|
||||||
iconStyle: 'font-size: 75px; color: green;'
|
iconStyle: 'font-size: 75px; color: green;'
|
||||||
}
|
}
|
||||||
|
this.$emit('success', true)
|
||||||
} else if (!response || response === 'error') {
|
} else if (!response || response === 'error') {
|
||||||
this.confirmation = {
|
this.confirmation = {
|
||||||
text: `Error deleting ${this.item.name} form ${this.type}s list. Please refresh your page and try again. If the Error persists, please contact dev team`,
|
text: `Error deleting ${this.item.name} form ${this.type}s list. Please refresh your page and try again. If the Error persists, please contact dev team`,
|
||||||
icon: 'el-icon-circle-close',
|
icon: 'el-icon-circle-close',
|
||||||
iconStyle: 'font-size: 75px; color: red;'
|
iconStyle: 'font-size: 75px; color: red;'
|
||||||
}
|
}
|
||||||
|
this.$emit('success', false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,9 +43,8 @@
|
||||||
<deletePopUp
|
<deletePopUp
|
||||||
:item="scope.row"
|
:item="scope.row"
|
||||||
:type="'product'"
|
:type="'product'"
|
||||||
|
@success="successfullyDeleted"
|
||||||
/>
|
/>
|
||||||
<!-- NEED TO SEND BACK SUCCESSFULLY DELETED from above SO IT REFETCHES THE PRODUCT LIST -->
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -97,6 +96,11 @@ export default {
|
||||||
this.total = response.data.fuels.length
|
this.total = response.data.fuels.length
|
||||||
this.listLoading = false
|
this.listLoading = false
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
successfullyDeleted: function(val) {
|
||||||
|
if (val) {
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue