[napajanie modalov na BE]

This commit is contained in:
romankko2 committed 2023-01-26 21:11:53 +01:00
1 parent 26792a85a6
commit 4c8ee66cd6
34 files changed
+494 -396

No files matched your search

@@ -127,22 +127,20 @@ export default {
}
},
async created() {
try {
const allEmployees = await this.$axios.get_auth_data('v1/employees')
this.allEmployees = this._enrichEmployeesByFullName(allEmployees)
} catch (error) {
this.$toast.error(error)
}
},
methods: {
async create(blocker = null) {
async showModal(blocker = null) {
this.visible = true
this.blocker = null
if (blocker) {
await this._load()
try {
const allEmployees = await this.$axios.get_auth_data('v1/employees')
this.allEmployees = this._enrichEmployeesByFullName(allEmployees)
} catch (error) {
this.$toast.error(error)
}
if (blocker?.id) {
await this._load(blocker.id)
} else {
const blocker = {
name: '',