diff --git a/server.js b/server.js
index e3ab194..46c392d 100644
--- a/server.js
+++ b/server.js
@@ -255,8 +255,8 @@ export function clientsServer() {
results: [
{
id: "6faa6bb6-1de6-422c-a401-1b35cd455303",
- start: "2022-10-20T20:23:49Z",
- end: "2022-10-20T21:23:53Z",
+ start: "2022-10-24T20:23:49Z",
+ end: "2022-10-24T21:23:53Z",
kind: "call",
subkind: null,
description: "",
@@ -296,10 +296,53 @@ export function clientsServer() {
},
],
},
+ {
+ id: "6faa6bb6-1de6-422c-a401-1b35cd455303",
+ start: "2022-10-24T15:23:49Z",
+ end: "2022-10-24T16:23:53Z",
+ kind: "call",
+ subkind: null,
+ description: "",
+ location: null,
+ members: [
+ {
+ id: "f7648f9a-e824-4bb3-a260-2b32dae9bc74",
+ person: {
+ id: "98dd401c-2b7b-4d9a-9159-720c74d8b23v",
+ last_name: "Захарченко",
+ first_name: "Юлия",
+ patronymic: "Николаевна",
+ },
+ role: null,
+ },
+ ],
+ employees: [
+ {
+ id: "f941a0c6-c750-4f79-92c0-d7a19354e422",
+ employee: {
+ id: "db541a67-e836-481f-a653-6325de7c567e",
+ last_name: "Захарова",
+ first_name: "Ольга",
+ patronymic: "Александровна",
+ },
+ role: null,
+ },
+ {
+ id: "f941a0c6-c750-4f79-92c0-d7a19354e422",
+ employee: {
+ id: "db831a14-e836-481f-a653-6325de7c311e",
+ last_name: "Жмыхов",
+ first_name: "Егор",
+ patronymic: "Сергеевич",
+ },
+ role: "owner",
+ },
+ ],
+ },
{
id: "7faa7bb7-2de6-422c-a401-1b35cd455303",
- start: "2022-10-20T10:00:00Z",
- end: "2022-10-20T11:10:00Z",
+ start: "2022-10-23T10:00:00Z",
+ end: "2022-10-23T11:10:00Z",
kind: "call",
subkind: null,
description: "",
@@ -315,6 +358,16 @@ export function clientsServer() {
},
role: null,
},
+ {
+ id: "a9239f9a-e824-4bb3-a260-2b32dae9bc76",
+ person: {
+ id: "15ff465c-2b7b-4d9a-9159-720c74d8b56d",
+ last_name: "Елесеевская",
+ first_name: "Татьяна",
+ patronymic: "Ивановна",
+ },
+ role: "primary",
+ },
],
employees: [
{
@@ -341,20 +394,20 @@ export function clientsServer() {
},
{
id: "2faa7bb2-2de6-422c-a401-1b35cd455223",
- start: "2022-10-20T10:00:00Z",
- end: "2022-10-20T11:10:00Z",
+ start: "2022-10-24T10:00:00Z",
+ end: "2022-10-24T11:10:00Z",
kind: "call",
subkind: null,
description: "",
location: null,
members: [
{
- id: "b0509f9a-e824-4bb3-a260-2b32dae9bc81",
+ id: "a9239f9a-e824-4bb3-a260-2b32dae9bc76",
person: {
- id: "14ff401c-2b7b-4d9a-9159-720c74d8b23c",
- last_name: "Гагарин",
- first_name: "Юрий",
- patronymic: "Алексеевич",
+ id: "15ff465c-2b7b-4d9a-9159-720c74d8b56d",
+ last_name: "Елесеевская",
+ first_name: "Татьяна",
+ patronymic: "Ивановна",
},
role: null,
},
@@ -383,26 +436,36 @@ export function clientsServer() {
],
},
{
- id: "6faa6bb2-1de4-425c-a401-1b35cd455303",
- start: "2022-10-20T20:23:49Z",
- end: "2022-10-20T21:23:53Z",
+ id: "2faa7bb2-2de6-422c-a401-1b35cd455223",
+ start: "2022-10-24T10:00:00Z",
+ end: "2022-10-24T11:10:00Z",
kind: "call",
subkind: null,
description: "",
location: null,
members: [
{
- id: "b0509f9a-e824-4bb3-a260-2b32dae9bc81",
+ id: "a9239f9a-e824-4bb3-a260-2b32dae9bc76",
person: {
- id: "14ff401c-2b7b-4d9a-9159-720c74d8b23c",
- last_name: "Гагарин",
- first_name: "Юрий",
- patronymic: "Алексеевич",
+ id: "15ff465c-2b7b-4d9a-9159-720c74d8b56d",
+ last_name: "Елесеевская",
+ first_name: "Татьяна",
+ patronymic: "Ивановна",
},
role: null,
},
],
employees: [
+ {
+ id: "f451a0c3-c734-4f73-91c2-d7a5674459e422",
+ employee: {
+ id: "dv841a15-e867-331f-a658-6325de7c311e",
+ last_name: "Коломойцев",
+ first_name: "Илья",
+ patronymic: "Петрович",
+ },
+ role: "owner",
+ },
{
id: "f941a0c6-c750-4f79-92c0-d7a19354e422",
employee: {
@@ -413,16 +476,6 @@ export function clientsServer() {
},
role: null,
},
- {
- id: "f941a0c6-c750-4f79-92c0-d7a19354e422",
- employee: {
- id: "db831a14-e836-481f-a653-6325de7c311e",
- last_name: "Жмыхов",
- first_name: "Егор",
- patronymic: "Сергеевич",
- },
- role: null,
- },
],
},
],
diff --git a/src/assets/sass/variables.sass b/src/assets/sass/variables.sass
index 14df095..3ff0f4a 100644
--- a/src/assets/sass/variables.sass
+++ b/src/assets/sass/variables.sass
@@ -26,4 +26,5 @@
--bg-event-blue-color: #3ba3ee
--light-grey-bg-color: #f8f9fa
--btn-green-color: rgba(60, 217, 75, 1)
- --btn-light-green-color: rgba(60, 217, 75, 0.2)
\ No newline at end of file
+ --btn-light-green-color: rgba(60, 217, 75, 0.2)
+ --border-light-grey-color-1: rgba(211, 212, 220, 0.5)
diff --git a/src/components/base/BaseInput.vue b/src/components/base/BaseInput.vue
index 3d21ca8..ededb78 100644
--- a/src/components/base/BaseInput.vue
+++ b/src/components/base/BaseInput.vue
@@ -1,7 +1,8 @@
.input-wrapper.flex.gap-x-2.px-4.box-border(class="py-2.5" :style="{ minWidth: widthInput + 'px' }")
- img.cursor-pointer( v-if="withIcon" :class="position" src="@/assets/icons/search-black.svg" alt="SearchTable")
- input.w-full.outline-0.text-base.not-italic(:style="{ backgroundColor: backgroundInput, fontSize: fontSizeInput }" :value="value" :type="type" @input="$emit('update:value', $event.target.value)" :placeholder="placeholder")
+ input.w-full.outline-0.text-base.not-italic(:style="{ backgroundColor: backgroundInput, fontSize: fontSizeInput }" :value="value" :type="type" @input="$emit('update:value', $event.target.value)" :placeholder="placeholder" :maxlength="maxLength")
+ .slot(v-if="withIcon" :class="iconPosition")
+ slot.cursor-pointer
diff --git a/src/pages/calendar/components/CalendarSchedule.vue b/src/pages/calendar/components/CalendarSchedule.vue
index 36d4fb2..ccf047e 100644
--- a/src/pages/calendar/components/CalendarSchedule.vue
+++ b/src/pages/calendar/components/CalendarSchedule.vue
@@ -16,8 +16,10 @@
:day-end-time="validateEndTime"
)
calendar-background(
+ :current-date="currentDate"
:hours-array="hoursArray"
:events-data="eventsData"
+ :sidebar-width="sidebarWidth"
)
.time-circle-indicator.left-74px(
v-if="isShownIndicator"
diff --git a/src/pages/clients/components/ClientDetailInfoSection.vue b/src/pages/clients/components/ClientDetailInfoSection.vue
index 2509942..4e3f830 100644
--- a/src/pages/clients/components/ClientDetailInfoSection.vue
+++ b/src/pages/clients/components/ClientDetailInfoSection.vue
@@ -5,18 +5,22 @@
.flex.items-center.gap-x-8(v-if="isOpenChange")
base-button-ok(@click="saveChange" v-if="isChange" :size="20" :icon-size="10" :dark-style="true")
.edit.icon-edit.cursor-pointer.text-sm(v-if="!isChange" @click="changeClientData")
- base-button-plus(v-if="settings[section].addFile" :size="20" :icon-size="10" :with-border="true")
+ .flex.relative
+ base-button-plus(v-if="settings[section].addFile" :size="20" :icon-size="10" :with-border="true" @click="openAddingWrap")
+ table-adding-new-doc(v-if="section === 'docs' && isOpenAddingWrap" :add-new-doc="addNewDoc" :save-docs="saveDocs" :new-docs="docData")
+ table-adding-new-additional(v-if="section === 'additional' && isOpenAddingWrap" :new-additional-data="additionalData" :add-new-additional="addDocAdditional" :save-additional="saveDocs" )
.section-body.w-full.flex.flex-col.px-4.pt-3.pb-4.gap-y-4
.flex.flex-col(v-for="(item, key) in sectionInfo" class="gap-y-1.5")
span.title-section.font-semibold.text-xs(v-if="settings[section].options") {{settings[section].options[key]}}
span.title-section.font-semibold.text-xs(v-if="item.header") {{item.header}}
client-detail-input.text-sm.text-sm.w-max-fit(v-if="isChange && item.value" :style="{fontWeight:item.copy&&600}" v-model:value="item.value" :width="settings[section].width")
.copy.icon-copy.cursor-pointer(v-if="item.copy")
- .flex.gap-x-4(v-if="item.value && !isChange")
+ .flex(v-if="item.value && !isChange")
span.text-sm.w-fit(:style="{fontWeight:item.copy&&600}") {{item.value}}
- .copy.icon-copy.cursor-pointer(v-if="item.copy")
- .flex.gap-x-4(v-if="item.name")
- .icon-files.cursor-pointer(:style="{color:settings.docsColor[item.type]}")
+ .copy.icon-copy.cursor-pointer.pl-4(v-if="item.copy")
+ .flex.items-center(v-if="item.name")
+ .icon-cancel.cancel.cursor-pointer.pr-3.text-xsm(v-if="isChange" :id="item.name" @click="(e) => deleteDoc(e, section)")
+ .icon-files.cursor-pointer.pr-3.text-xl(:style="{color:settings.docsColor[item.type]}")
span.text-sm {{item.name}}
@@ -24,16 +28,34 @@
import ClientDetailInput from "@/pages/clients/components/ClientDetailInput";
import BaseButtonOk from "@/components/base/buttons/BaseButtonOk";
import BaseButtonPlus from "@/components/base/buttons/BaseButtonPlus";
+import TableAddingNewDoc from "@/pages/clients/components/TableAddingNewDoc";
+import TableAddingNewAdditional from "@/pages/clients/components/TableAddingNewAdditional";
import { detail } from "@/pages/clients/utils/tableConfig";
export default {
name: "ClientDetailInfoSection",
- components: { BaseButtonPlus, BaseButtonOk, ClientDetailInput },
+ components: {
+ TableAddingNewAdditional,
+ BaseButtonPlus,
+ BaseButtonOk,
+ ClientDetailInput,
+ TableAddingNewDoc,
+ },
props: {
+ saveNewDoc: Function,
sectionInfo: Object,
section: String,
+ deleteDoc: Function,
},
data() {
return {
+ additionalData: {
+ header: "",
+ value: "",
+ name: "",
+ type: "",
+ },
+ docData: [],
+ isOpenAddingWrap: false,
isOpenChange: false,
isChange: false,
settings: detail,
@@ -50,6 +72,32 @@ export default {
this.isOpenChange = false;
this.isChange = false;
},
+ openAddingWrap() {
+ this.isOpenAddingWrap = true;
+ },
+ addNewDoc(e) {
+ this.docData = [...this.docData, ...e.target.files];
+ },
+ addDocAdditional(e) {
+ this.additionalData.name = e.target.files[0].name;
+ this.additionalData.type = e.target.files[0].type;
+ },
+ saveDocs() {
+ if (this.section === "additional") {
+ this.saveNewDoc(this.section, [this.additionalData]);
+ } else {
+ this.saveNewDoc(this.section, this.docData);
+ }
+ this.isOpenAddingWrap = false;
+ this.isOpenChange = false;
+ this.docData = [];
+ this.additionalData = {
+ header: "",
+ value: "",
+ name: "",
+ type: "",
+ };
+ },
},
};
@@ -87,4 +135,8 @@ export default {
color: var(--btn-blue-color)
&:hover
opacity: 0.6
+.cancel
+ color: var(--font-grey-color)
+ &:hover
+ opacity: 0.6
diff --git a/src/pages/clients/components/ClientDetailInfoWrapper.vue b/src/pages/clients/components/ClientDetailInfoWrapper.vue
index a7f0230..be4a6c2 100644
--- a/src/pages/clients/components/ClientDetailInfoWrapper.vue
+++ b/src/pages/clients/components/ClientDetailInfoWrapper.vue
@@ -7,8 +7,8 @@
.flex.flex-col.gap-y-2
client-detail-info-section(:section-info="dataDetail.birthday" section="birthday")
client-detail-info-section(:section-info="dataDetail.addresses" section="addresses")
- client-detail-info-section(:section-info="dataDetail.docs" section="docs")
- client-detail-info-section(:section-info="dataDetail.additional" section="additional")
+ client-detail-info-section(:section-info="dataDetail.docs" section="docs" :save-new-doc="saveNewDoc" :delete-doc="deleteDoc")
+ client-detail-info-section(:section-info="dataDetail.additional" section="additional" :save-new-doc="saveNewDoc" :delete-doc="deleteDoc")
diff --git a/src/pages/clients/components/ClientDetailInput.vue b/src/pages/clients/components/ClientDetailInput.vue
index 261cca4..ef80414 100644
--- a/src/pages/clients/components/ClientDetailInput.vue
+++ b/src/pages/clients/components/ClientDetailInput.vue
@@ -13,7 +13,7 @@ export default {
},
computed: {
heightInput() {
- return ((this.width / 100) * 70) / 8;
+ return ((this.width / 100) * 70) / 11;
},
},
};
diff --git a/src/pages/clients/components/ClientsTableHat.vue b/src/pages/clients/components/ClientsTableHat.vue
index 9155cc5..41f0179 100644
--- a/src/pages/clients/components/ClientsTableHat.vue
+++ b/src/pages/clients/components/ClientsTableHat.vue
@@ -3,11 +3,12 @@
.flex.gap-2.w-fit.h-fit
.input
base-input(:with-icon="true")
+ .icon-search
button.filter-button.flex.items-center.justify-center.box-border(class="px-2.5")
.icon-filter.text-xl.leading-4
clients-table-header-actions(v-if="!!isOpenActions" :is-selected-one="isOpenActions===1")
.flex.w-fit.h-fit.gap-x-2
- bass-export-button(:only-icon="true")
+ base-export-button(:only-icon="true")
base-create-button(@click="openFormCreate" :with-icon="true")
@@ -15,13 +16,13 @@
diff --git a/src/pages/clients/components/TableAddingNewAdditional.vue b/src/pages/clients/components/TableAddingNewAdditional.vue
new file mode 100644
index 0000000..0ceafa3
--- /dev/null
+++ b/src/pages/clients/components/TableAddingNewAdditional.vue
@@ -0,0 +1,66 @@
+
+ .flex.absolute.flex-col.items-end.right-3.top-5
+ .corner
+ .wrap.flex.flex-col.p-4.gap-y-4
+ .flex.flex-col.gap-y-1
+ base-input(:with-icon="true" v-model:value="newAdditionalData.header" icon-position="right" :max-length="140" placeholder="Заголовок")
+ span.counter {{`${newAdditionalData.header.length}/140`}}
+ .description.flex.px-4.py-3
+ textarea.w-full.h-full.outline-0.resize-none(:value="newAdditionalData.value" @input="$emit('update:newAdditionalData.value', $event.target.value)" placeholder="Описание" style="py-10")
+ .place.flex.flex-col.justify-center.items-center.py-3
+ .upload.text-center.text-sm.flex.w-fit
+ input.hidden(@change="(e) => addNewAdditional(e)" type="file" id="file-upload")
+ span Загрузите элемент
+ label.label.cursor-pointer(for="file-upload") с компьютера
+ span или перетащите их сюда
+ base-create-button(text="Добавить" @click="saveAdditional")
+
+
+
+
+
diff --git a/src/pages/clients/components/TableAddingNewDoc.vue b/src/pages/clients/components/TableAddingNewDoc.vue
new file mode 100644
index 0000000..0dcca58
--- /dev/null
+++ b/src/pages/clients/components/TableAddingNewDoc.vue
@@ -0,0 +1,57 @@
+
+ .flex.absolute.flex-col.items-end.right-3.top-5
+ .corner
+ .wrap.flex.flex-col.p-4.gap-y-4
+ .flex.flex-col.gap-y-2
+ .place.flex.flex-col.justify-center.items-center.py-3
+ .upload.text-center.text-sm.flex.w-fit
+ input.hidden(@change="(e) => addNewDoc(e)" type="file" id="file-upload" multiple)
+ span Загрузите элемент
+ label.label.cursor-pointer(for="file-upload") с компьютера
+ span или перетащите их сюда
+ .flex.flex-col
+ span.name-doc.py-2.px-3(v-for="doc in newDocs") {{doc.name}}
+ base-create-button(text="Добавить" @click="saveDocs")
+
+
+
+
+