WIP Исправила статусы, очистку форму создания

This commit is contained in:
Daria Golova
2023-03-20 16:36:28 +03:00
parent 1f50c12581
commit 6bfda2e2a7
5 changed files with 32 additions and 52 deletions

View File

@@ -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() {

View File

@@ -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")