WIP Исправила статусы, очистку форму создания
This commit is contained in:
@@ -130,7 +130,7 @@ export default {
|
||||
networksSettings: column.find((el) => el.name === "networks")?.settings,
|
||||
prioritySettings: column.find((el) => el.name === "priority"),
|
||||
networkId: "",
|
||||
infoClient: {
|
||||
defaultInfoClient: {
|
||||
basic: {
|
||||
full_name: "",
|
||||
birth_date: null,
|
||||
@@ -190,6 +190,7 @@ export default {
|
||||
},
|
||||
],
|
||||
},
|
||||
infoClient: {},
|
||||
forms: [
|
||||
{
|
||||
title: "Основное",
|
||||
@@ -267,9 +268,6 @@ export default {
|
||||
closePopup() {
|
||||
this.showPopup = false;
|
||||
},
|
||||
/*closeModal() {
|
||||
!this.showModal ? this.closeForm() : null;
|
||||
},*/
|
||||
async createIdentityDocument(id) {
|
||||
let doc = null;
|
||||
let filteredData = Object.keys(
|
||||
@@ -370,6 +368,7 @@ export default {
|
||||
this.writeCreatedClientId(result.id);
|
||||
this.setUpdatedClients();
|
||||
this.addSuccessNotification();
|
||||
this.value = false;
|
||||
});
|
||||
} else {
|
||||
this.addErrorNotification(
|
||||
@@ -393,10 +392,7 @@ export default {
|
||||
this.infoClient.basic.priority = e.target.id;
|
||||
},
|
||||
saveClient() {
|
||||
if (this.checkFormFullness()) {
|
||||
this.postNewClient();
|
||||
//this.closeForm();
|
||||
}
|
||||
if (this.checkFormFullness()) this.postNewClient();
|
||||
},
|
||||
changeOpenModal() {
|
||||
this.showModal = true;
|
||||
@@ -483,6 +479,13 @@ export default {
|
||||
this.closeAddImage();
|
||||
}
|
||||
},
|
||||
value(newValue) {
|
||||
if (newValue === false)
|
||||
this.infoClient = JSON.parse(JSON.stringify(this.defaultInfoClient));
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.infoClient = JSON.parse(JSON.stringify(this.defaultInfoClient));
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -24,7 +24,6 @@
|
||||
@delete-event="openModal",
|
||||
:open-form-create-event="openFormCreateEvent"
|
||||
)
|
||||
transition(name="form")
|
||||
calendar-form-add-event(
|
||||
v-model="isOpenForm"
|
||||
:close-form="closeFormCreateEvent",
|
||||
@@ -56,7 +55,7 @@ import CalendarSidebar from "./components/CalendarSidebar.vue";
|
||||
import CalendarFormAddEvent from "./components/CalendarFormAddEvent.vue";
|
||||
import BaseModal from "@/components/base/BaseModal.vue";
|
||||
import CalendarDeleteModal from "./components/CalendarDeleteModal.vue";
|
||||
import { statusesDictionary } from "@/pages/calendar/utils/statusesDictionary";
|
||||
import { statusesConfig } from "@/pages/calendar/utils/statusesConfig";
|
||||
|
||||
export default {
|
||||
name: "TheCalendar",
|
||||
@@ -86,7 +85,7 @@ export default {
|
||||
isOpenForm: false,
|
||||
WORKING_STATUS: "WORKS",
|
||||
changeFormWasClosed: false,
|
||||
eventStatuses: statusesDictionary,
|
||||
eventStatuses: statusesConfig,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -191,23 +190,4 @@ export default {
|
||||
<style lang="sass" scoped>
|
||||
.calendar-container
|
||||
width: calc(100vw - 80px)
|
||||
|
||||
.form-enter-from
|
||||
opacity: 0
|
||||
transform: translateY(300px)
|
||||
pointer-events: none
|
||||
|
||||
.form-enter-active
|
||||
transition: 0.5s ease
|
||||
|
||||
.form-leave-to
|
||||
opacity: 0
|
||||
transform: translateY(300px)
|
||||
pointer-events: none
|
||||
|
||||
.form-leave-active
|
||||
transition: 0.5s ease
|
||||
|
||||
.form-move
|
||||
transition: 0.5s ease
|
||||
</style>
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { statusesDictionary } from "@/pages/calendar/utils/statusesDictionary";
|
||||
import { statusesConfig } from "@/pages/calendar/utils/statusesConfig";
|
||||
|
||||
export default {
|
||||
name: "CalendarEventDescriptionCard",
|
||||
@@ -48,14 +48,12 @@ export default {
|
||||
return {
|
||||
isCertainType: true,
|
||||
position: {},
|
||||
calendarConfig: statusesDictionary,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
status() {
|
||||
return this.ownerEvent.status
|
||||
? this.calendarConfig.find((e) => e.value === this.ownerEvent.status)
|
||||
.label
|
||||
? statusesConfig.find((e) => e.value === this.ownerEvent.status).label
|
||||
: "";
|
||||
},
|
||||
typeColor() {
|
||||
|
||||
@@ -82,7 +82,7 @@ import BaseSelect from "@/components/base/BaseSelect.vue";
|
||||
import * as moment from "moment/moment";
|
||||
import BaseModal from "@/components/base/BaseModal.vue";
|
||||
import { v_model } from "@/shared/mixins/v-model";
|
||||
import { statusesDictionary } from "@/pages/calendar/utils/statusesDictionary";
|
||||
import { statusesConfig } from "@/pages/calendar/utils/statusesConfig";
|
||||
|
||||
export default {
|
||||
name: "FormChangeEvent",
|
||||
@@ -138,7 +138,6 @@ export default {
|
||||
membersData: [],
|
||||
ownersData: [],
|
||||
WORKING_STATUS: "WORKS",
|
||||
calendarConfig: statusesDictionary,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
@@ -178,7 +177,7 @@ export default {
|
||||
},
|
||||
statusesList() {
|
||||
let filteredArray = [];
|
||||
this.calendarConfig.forEach((elem) => {
|
||||
statusesConfig.forEach((elem) => {
|
||||
filteredArray.push({
|
||||
id: elem.id,
|
||||
label: elem.label,
|
||||
@@ -290,22 +289,22 @@ export default {
|
||||
eventStatus() {
|
||||
return this.selectedEventData.status
|
||||
? {
|
||||
label: this.calendarConfig.find(
|
||||
label: statusesConfig.find(
|
||||
(e) => e.value === this.selectedEventData.status
|
||||
).label,
|
||||
id: this.calendarConfig.find(
|
||||
id: statusesConfig.find(
|
||||
(e) => e.value === this.selectedEventData.status
|
||||
).id,
|
||||
}
|
||||
: {
|
||||
label: this.calendarConfig.find((e) => e.value === "PLANNED").id,
|
||||
label: statusesConfig.find((e) => e.value === "PLANNED").label,
|
||||
id: 0,
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
findStatus(value) {
|
||||
return this.calendarConfig.find((e) => e.label === value)?.value;
|
||||
return statusesConfig.find((e) => e.label === value)?.value;
|
||||
},
|
||||
checkTimeLimits(eventTime, scheduleTime, timeType) {
|
||||
if (timeType === "start")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const statusesDictionary = [
|
||||
export const statusesConfig = [
|
||||
{
|
||||
id: 0,
|
||||
label: "Планируется прием",
|
||||
Reference in New Issue
Block a user