[WIP] Правка placeholder адреса
This commit is contained in:
@@ -104,11 +104,14 @@ export default {
|
||||
saveEmployeesData(res) {
|
||||
this.employeesData = res.results;
|
||||
},
|
||||
logout() {
|
||||
localStorage.removeItem("tokenAccess");
|
||||
this.$router.push("/login");
|
||||
},
|
||||
fetchEmployeesData() {
|
||||
fetchWrapper.get("general/employee/").then((res) => {
|
||||
if (res.type === "client_error") {
|
||||
localStorage.removeItem("tokenAccess");
|
||||
return this.$router.push("/login");
|
||||
this.logout();
|
||||
} else this.saveEmployeesData(res);
|
||||
});
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
.text-info.text-xxs.font-semibold Город
|
||||
base-select.cursor-grab(
|
||||
disable,
|
||||
placeholder="Выберите город",
|
||||
placeholder="Введите город",
|
||||
v-model="dopeAddress.city",
|
||||
:style="{backgroundColor: 'var(--bg-disable-grey-color)'}"
|
||||
)
|
||||
|
||||
@@ -118,6 +118,10 @@ export default {
|
||||
this.fetchDataClients();
|
||||
}
|
||||
},
|
||||
logout() {
|
||||
localStorage.removeItem("tokenAccess");
|
||||
this.$router.push("/login");
|
||||
},
|
||||
async fetchDataClients() {
|
||||
let response = {};
|
||||
if (this.textSearch) {
|
||||
@@ -126,12 +130,16 @@ export default {
|
||||
this.limit
|
||||
}&offset=${(this.currentTablePage - 1) * this.limit}`
|
||||
);
|
||||
this.saveDataClients(response);
|
||||
this.saveFilteredClientsCount(response);
|
||||
this.paginationInfo = {
|
||||
currentPage: this.currentTablePage,
|
||||
length: this.calculatePageCount(this.filteredClientsCount),
|
||||
};
|
||||
if (response.type === "client_error") {
|
||||
this.logout();
|
||||
} else {
|
||||
this.saveDataClients(response);
|
||||
this.saveFilteredClientsCount(response);
|
||||
this.paginationInfo = {
|
||||
currentPage: this.currentTablePage,
|
||||
length: this.calculatePageCount(this.filteredClientsCount),
|
||||
};
|
||||
}
|
||||
} else {
|
||||
response = await fetchWrapper.get(
|
||||
`general/person/?limit=${this.limit}&offset=${
|
||||
@@ -139,8 +147,7 @@ export default {
|
||||
}`
|
||||
);
|
||||
if (response.type === "client_error") {
|
||||
localStorage.removeItem("tokenAccess");
|
||||
return this.$router.push("/login");
|
||||
this.logout();
|
||||
} else {
|
||||
this.saveDataClients(response);
|
||||
this.saveClientsCount(response);
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
.text-info.text-xxs.font-semibold Город
|
||||
base-input.input-info(
|
||||
disabled,
|
||||
placeholder="Выберите город",
|
||||
placeholder="Введите город",
|
||||
v-model:value="addresses.city",
|
||||
:style="{backgroundColor: 'var(--bg-disable-grey-color)'}"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user