mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-13 02:32:15 +01:00
add edit modal for tasks and clients, fixes ST-233
This commit is contained in:
@@ -1,12 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
import type { Client } from '@/utils/api';
|
||||
import { computed } from 'vue';
|
||||
import { computed, ref } from 'vue';
|
||||
import { CheckCircleIcon } from '@heroicons/vue/20/solid';
|
||||
import { useClientsStore } from '@/utils/useClients';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import ClientMoreOptionsDropdown from '@/Components/Common/Client/ClientMoreOptionsDropdown.vue';
|
||||
import { useProjectsStore } from '@/utils/useProjects';
|
||||
import TableRow from '@/Components/TableRow.vue';
|
||||
import ClientEditModal from '@/Components/Common/Client/ClientEditModal.vue';
|
||||
|
||||
const { projects } = storeToRefs(useProjectsStore());
|
||||
|
||||
@@ -23,10 +24,15 @@ const projectCount = computed(() => {
|
||||
(projects) => projects.client_id === props.client.id
|
||||
).length;
|
||||
});
|
||||
|
||||
const showEditModal = ref(false);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TableRow>
|
||||
<ClientEditModal
|
||||
:client="client"
|
||||
v-model:show="showEditModal"></ClientEditModal>
|
||||
<div
|
||||
class="whitespace-nowrap flex items-center space-x-5 3xl:pl-12 py-4 pr-3 text-sm font-medium text-white pl-4 sm:pl-6 lg:pl-8 3xl:pl-12">
|
||||
<span>
|
||||
@@ -43,6 +49,7 @@ const projectCount = computed(() => {
|
||||
class="relative whitespace-nowrap flex items-center pl-3 text-right text-sm font-medium sm:pr-0 pr-4 sm:pr-6 lg:pr-8 3xl:pr-12">
|
||||
<ClientMoreOptionsDropdown
|
||||
:client="client"
|
||||
@edit="showEditModal = true"
|
||||
@delete="deleteClient"></ClientMoreOptionsDropdown>
|
||||
</div>
|
||||
</TableRow>
|
||||
|
||||
Reference in New Issue
Block a user