diff --git a/app/src/plugins/lib@auth/_theme/auth.theme.sass b/app/src/plugins/lib@auth/_theme/auth.theme.sass index 3e642e6..9286d61 100644 --- a/app/src/plugins/lib@auth/_theme/auth.theme.sass +++ b/app/src/plugins/lib@auth/_theme/auth.theme.sass @@ -69,10 +69,16 @@ input::-webkit-inner-spin-button .v-select .v-field--variant-solo border: none !important +.rich-text-editor + border: 1px solid rgba(0, 0, 0, 0.1) + .error .dp__input, -.v-input.error .v-input__control, -.rich-text-editor.error +.v-input.error .v-input__control border: 1px solid red !important +.error .ql-toolbar.ql-snow, +.error .ql-container.ql-snow + border-color: red !important + .v-messages__message color: red !important \ No newline at end of file diff --git a/app/src/plugins/tm@_components/z-autocomplete.vue b/app/src/plugins/tm@_components/z-autocomplete.vue index 3458a89..86b5865 100644 --- a/app/src/plugins/tm@_components/z-autocomplete.vue +++ b/app/src/plugins/tm@_components/z-autocomplete.vue @@ -1,7 +1,7 @@ + + + \ No newline at end of file diff --git a/app/src/plugins/tm@modal/master-task/_components/a-tasks-table.vue b/app/src/plugins/tm@modal/master-task/_components/a-tasks-table.vue new file mode 100644 index 0000000..827ca12 --- /dev/null +++ b/app/src/plugins/tm@modal/master-task/_components/a-tasks-table.vue @@ -0,0 +1,71 @@ + + + + + \ No newline at end of file diff --git a/app/src/plugins/tm@modal/master-task/_mixins/selects.mixin.ts b/app/src/plugins/tm@modal/master-task/_mixins/selects.mixin.ts new file mode 100644 index 0000000..d6d003e --- /dev/null +++ b/app/src/plugins/tm@modal/master-task/_mixins/selects.mixin.ts @@ -0,0 +1,58 @@ +export default { + computed: { + employeesOptions() { + const selectedEmployees = [...this.masterTask.employees, ...this.masterTask.team?.employees] + .map(employee => employee.id) + + const employees = this.employees.filter( + (employee) => !selectedEmployees.includes(employee.id) + ) || [] + + return employees.map((employee) => { + return { + key: employee.id, + value: `${employee.name} ${employee.surname}`, + } + }) + } + }, + + methods: { + onProjectSelected({ key }) { + const project = this.projects.find(project => project.id == key) + this.masterTask.project_code = project.code + this.masterTask.project_id = project.id + }, + + onEmployeeSelected({ key }) { + const employee = this.employees.find(employee => employee.id == key) + this.masterTask.employees.push(employee) + this.showAddEmployeeInput = false + }, + + onEmployeeDurationChanged() { + let totalDuration = 0 + + this.masterTask.employees = this.masterTask.employees.map(employee => { + if (typeof employee.duration == 'string') { + totalDuration += parseInt(employee.duration) + employee.duration = parseInt(employee.duration) + } + else if (typeof employee.duration == 'number') { + totalDuration += employee.duration + } + + return employee + }) + + this.masterTask.duration = totalDuration + } + }, + + watch: { + 'masterTask.team_id'(value) { + if (!value) return + this.masterTask.team = this.teams.find(team => team.id == value) + } + } +} \ No newline at end of file diff --git a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue index fcf79e2..2046ea1 100644 --- a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue +++ b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue @@ -4,138 +4,50 @@ - + - + - + - + - + - +

{{ employee.name.charAt(0) + employee.surname.charAt(0) }}

- + +

+ {{ employee.name.charAt(0) + employee.surname.charAt(0) }} +

+
- - Pridať zamestnanca - + -