mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-16 12:12:15 +01:00
add format check, update prettier rules, apply rules consistently
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import TextInput from '@/packages/ui/src/Input/TextInput.vue';
|
||||
import SecondaryButton from '@/packages/ui/src/Buttons/SecondaryButton.vue';
|
||||
import DialogModal from '@/packages/ui/src/DialogModal.vue';
|
||||
import { ref, watch } from "vue";
|
||||
import { ref, watch } from 'vue';
|
||||
import PrimaryButton from '@/packages/ui/src/Buttons/PrimaryButton.vue';
|
||||
import { useFocus } from '@vueuse/core';
|
||||
import { useTasksStore } from '@/utils/useTasks';
|
||||
@@ -23,9 +23,12 @@ const props = defineProps<{
|
||||
|
||||
const taskProjectId = ref<string>(props.projectId);
|
||||
|
||||
watch(() => props.projectId, (value) => {
|
||||
taskProjectId.value = value;
|
||||
});
|
||||
watch(
|
||||
() => props.projectId,
|
||||
(value) => {
|
||||
taskProjectId.value = value;
|
||||
}
|
||||
);
|
||||
|
||||
async function submit() {
|
||||
await createTask({
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import {
|
||||
TrashIcon,
|
||||
PencilSquareIcon,
|
||||
CheckCircleIcon,
|
||||
} from '@heroicons/vue/20/solid';
|
||||
import { TrashIcon, PencilSquareIcon, CheckCircleIcon } from '@heroicons/vue/20/solid';
|
||||
import type { Task } from '@/packages/api/src';
|
||||
import { canDeleteTasks, canUpdateTasks } from '@/utils/permissions';
|
||||
import {
|
||||
|
||||
@@ -18,9 +18,7 @@ const createTask = ref(false);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<TaskCreateModal
|
||||
v-model:show="createTask"
|
||||
:project-id="props.projectId"></TaskCreateModal>
|
||||
<TaskCreateModal v-model:show="createTask" :project-id="props.projectId"></TaskCreateModal>
|
||||
<div class="flow-root">
|
||||
<div class="inline-block min-w-full align-middle">
|
||||
<div
|
||||
@@ -29,22 +27,14 @@ const createTask = ref(false);
|
||||
class="grid min-w-full"
|
||||
style="
|
||||
grid-template-columns:
|
||||
1fr minmax(80px, auto) minmax(120px, auto) minmax(
|
||||
50px,
|
||||
auto
|
||||
)
|
||||
1fr minmax(80px, auto) minmax(120px, auto) minmax(50px, auto)
|
||||
80px;
|
||||
">
|
||||
<TaskTableHeading></TaskTableHeading>
|
||||
<div
|
||||
v-if="tasks.length === 0"
|
||||
class="col-span-5 py-24 text-center">
|
||||
<PlusCircleIcon
|
||||
class="w-8 text-icon-default inline pb-2"></PlusCircleIcon>
|
||||
<div v-if="tasks.length === 0" class="col-span-5 py-24 text-center">
|
||||
<PlusCircleIcon class="w-8 text-icon-default inline pb-2"></PlusCircleIcon>
|
||||
<h3 class="text-text-primary font-semibold">No tasks found</h3>
|
||||
<p v-if="canCreateTasks()" class="pb-5">
|
||||
Create your first task now!
|
||||
</p>
|
||||
<p v-if="canCreateTasks()" class="pb-5">Create your first task now!</p>
|
||||
<SecondaryButton
|
||||
v-if="canCreateTasks()"
|
||||
:icon="PlusIcon"
|
||||
|
||||
@@ -8,12 +8,8 @@ import TableHeading from '@/Components/Common/TableHeading.vue';
|
||||
class="py-1.5 pr-3 text-left font-semibold text-text-primary pl-4 sm:pl-6 lg:pl-8 3xl:pl-12">
|
||||
Task Name
|
||||
</div>
|
||||
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">
|
||||
Total Time
|
||||
</div>
|
||||
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">
|
||||
Progress
|
||||
</div>
|
||||
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">Total Time</div>
|
||||
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">Progress</div>
|
||||
<div class="px-3 py-1.5 text-left font-semibold text-text-primary">Status</div>
|
||||
<div class="relative py-1.5 pl-3 pr-4 sm:pr-6 lg:pr-8 3xl:pr-12">
|
||||
<span class="sr-only">Edit</span>
|
||||
|
||||
@@ -54,10 +54,8 @@ const showTaskEditModal = ref(false);
|
||||
</span>
|
||||
<span v-else> -- </span>
|
||||
</div>
|
||||
<div
|
||||
class="whitespace-nowrap px-3 flex items-center text-sm text-text-secondary">
|
||||
<UpgradeBadge
|
||||
v-if="!isAllowedToPerformPremiumAction()"></UpgradeBadge>
|
||||
<div class="whitespace-nowrap px-3 flex items-center text-sm text-text-secondary">
|
||||
<UpgradeBadge v-if="!isAllowedToPerformPremiumAction()"></UpgradeBadge>
|
||||
<EstimatedTimeProgress
|
||||
v-else-if="task.estimated_time"
|
||||
:estimated="task.estimated_time"
|
||||
@@ -83,9 +81,7 @@ const showTaskEditModal = ref(false);
|
||||
@edit="showTaskEditModal = true"
|
||||
@delete="deleteTask"></TaskMoreOptionsDropdown>
|
||||
</div>
|
||||
<TaskEditModal
|
||||
v-model:show="showTaskEditModal"
|
||||
:task="task"></TaskEditModal>
|
||||
<TaskEditModal v-model:show="showTaskEditModal" :task="task"></TaskEditModal>
|
||||
</TableRow>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user