fix: project kegiatan

Deskripsi:
- fix format tgl di server soalnya di server -1 day, di tambah kegiatan, tambah task kegiatan, dan edit task kegiatan
- hapus pilih semua pada bagian pilih anggota

No Issues
This commit is contained in:
amel
2024-11-07 17:21:59 +08:00
parent 14b1c9c012
commit aac649b01f
12 changed files with 34 additions and 32 deletions

View File

@@ -4,13 +4,13 @@ import LayoutModal from '@/module/_global/layout/layout_modal';
import { useHookstate } from '@hookstate/core';
import { Box, Button, Flex, Group, rem, SimpleGrid, Stack, Text, TextInput } from '@mantine/core';
import { DatePicker } from '@mantine/dates';
import { useShallowEffect } from '@mantine/hooks';
import moment from 'moment';
import { useParams, useRouter } from 'next/navigation';
import { useState } from 'react';
import toast from 'react-hot-toast';
import { useWibuRealtime } from 'wibu-realtime';
import { funCreateDetailProject } from '../lib/api_project';
import { useShallowEffect } from '@mantine/hooks';
export default function AddDetailTaskProject() {
const [value, setValue] = useState<[Date | null, Date | null]>([null, null]);
@@ -35,8 +35,8 @@ export default function AddDetailTaskProject() {
setLoadingModal(true)
const res = await funCreateDetailProject(param.id, {
name,
dateStart: (value[0] != null) ? value[0] : new Date,
dateEnd: (value[1] != null) ? value[1] : new Date,
dateStart: (value[0] != null) ? moment(value[0]).format('YYYY-MM-DD') : moment(new Date).format('YYYY-MM-DD'),
dateEnd: (value[1] != null) ? moment(value[1]).format('YYYY-MM-DD') : moment(new Date).format('YYYY-MM-DD'),
})
if (res.success) {