upd: task
Deskripsi: - update status task - progress task No Issues
This commit is contained in:
@@ -37,7 +37,7 @@ export const funDeleteDetailTask = async (path: string) => {
|
||||
};
|
||||
|
||||
|
||||
export const funUpdateStatusDetailTask = async (path: string, data: { status: number }) => {
|
||||
export const funUpdateStatusDetailTask = async (path: string, data: { status: number, idProject: string }) => {
|
||||
const response = await fetch(`/api/task/detail/${path}`, {
|
||||
method: "PUT",
|
||||
headers: {
|
||||
|
||||
@@ -68,7 +68,7 @@ export default function ListTugasDetailTask() {
|
||||
|
||||
async function onUpdateStatus(val: number) {
|
||||
try {
|
||||
const res = await funUpdateStatusDetailTask(idData, { status: val });
|
||||
const res = await funUpdateStatusDetailTask(idData, { status: val, idProject: param.detail });
|
||||
if (res.success) {
|
||||
toast.success(res.message);
|
||||
refresh.set(true)
|
||||
|
||||
@@ -176,8 +176,8 @@ export default function ListDivisionTask() {
|
||||
</Card.Section>
|
||||
<Box pt={10}>
|
||||
<Progress.Root size="xl" radius="xl" style={{ border: `1px solid ${'#BDBDBD'}` }}>
|
||||
<Progress.Section value={v.status} color="yellow" striped >
|
||||
<Progress.Label>{v.status}%</Progress.Label>
|
||||
<Progress.Section value={v.progress} color="yellow" striped >
|
||||
<Progress.Label>{v.progress}%</Progress.Label>
|
||||
</Progress.Section>
|
||||
</Progress.Root>
|
||||
<Text my={10}>{v.desc}</Text>
|
||||
|
||||
Reference in New Issue
Block a user