2024-04-17 22:38:47 -04:00
|
|
|
'use client'
|
|
|
|
import React from "react";
|
|
|
|
import {TitleOperation} from "@/app/ui/task/TitleOperation";
|
2024-04-23 01:19:26 -04:00
|
|
|
import LocalContext from "../ui/LocalContent";
|
|
|
|
import dayjs from "dayjs";
|
2024-04-17 22:38:47 -04:00
|
|
|
|
|
|
|
export default function Layout({children}: { children: React.ReactNode }) {
|
2024-04-23 01:19:26 -04:00
|
|
|
const [taskState, setTaskState] = React.useState<string>('8,9')
|
|
|
|
let expectStartTimeList=[];
|
|
|
|
expectStartTimeList.push({'name':"expectedStartTime",'value':dayjs().subtract(7,'day'),'operateType':">="});
|
|
|
|
expectStartTimeList.push({'name':"expectedStartTime",'value':dayjs().add(7,'day'),'operateType':"<"})
|
|
|
|
const [expectedStartTime, setExpectedStartTime] = React.useState<string>(JSON.stringify(expectStartTimeList))
|
2024-04-12 06:43:55 -04:00
|
|
|
return (
|
2024-04-17 22:38:47 -04:00
|
|
|
<div>
|
2024-04-23 01:19:26 -04:00
|
|
|
<TitleOperation setTaskState={setTaskState} setExpectedStartTime={setExpectedStartTime}/>
|
|
|
|
<LocalContext.Provider value={{'taskState':taskState,'expectedStartTime':expectedStartTime}}>
|
|
|
|
{children}
|
|
|
|
</LocalContext.Provider>
|
|
|
|
</div>
|
2024-04-12 06:43:55 -04:00
|
|
|
);
|
2024-04-17 22:38:47 -04:00
|
|
|
}
|