fix: previous bug from 2 more places

This commit is contained in:
Mahyar Khanbolooki
2025-09-14 18:25:29 +03:30
parent 29f53c703d
commit 9c03ed8766
2 changed files with 18 additions and 0 deletions
@@ -1032,6 +1032,12 @@ export default {
data.province_id = this.user.province_id
data.city_name = this.user.city_name
data.city_id = this.user.city_id
const oldValues = [
'verity',
'panatech',
'both',
]
data.representation_type = data.representation_type.filter(x => !oldValues.includes(x))
this.$axios
.post(`/api/user/representation`, data)
@@ -1091,6 +1097,12 @@ export default {
data.city_id = this.user.city_id
data.mobile_number = this.user.mobile_number
}
const oldValues = [
'verity',
'panatech',
'both',
]
data.representation_type = data.representation_type.filter(x => !oldValues.includes(x))
const url = this.isAdmin ? `/api/admin/updateAgent/${this.data._id}` : `/api/user/representation/${this.data._id}`
this.$axios