Skip to content

Commit

Permalink
Ammar2 (#36)
Browse files Browse the repository at this point in the history
* check

* New component

* New component

* new line

---------

Co-authored-by: AmmarMohib <[email protected]>
  • Loading branch information
bilalmohib and AmmarMohib authored Apr 21, 2023
1 parent 0d16149 commit aa4fff5
Show file tree
Hide file tree
Showing 7 changed files with 557 additions and 228 deletions.
2 changes: 1 addition & 1 deletion components/Main/MyTasks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const MyTasks = () => {

// const { projectName, projectID } = router.query;
const projectName = "FYP";
const projectID = "TQnqsnjrNFYYDPnVYZtx";
const projectID = "60ey7xJel4dLrhBpKwIh";

const [firestoreData, setFirestoreData] = useState<any>([]);
const [status, setStatus] = useState<Boolean>(false);
Expand Down
68 changes: 62 additions & 6 deletions components/ProjectDetails/List/index.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
import React, { useState, useEffect, useRef } from 'react';
import {
Autocomplete,
TextField
TextField,
} from '@mui/material';
// import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';
import Link from 'next/link';

import MultiSelectChipDropDown from './MultiSelectChipDropDown';

import styles from './style.module.css';
// import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
// import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
// const currentDate = new Date();
// import { DemoContainer } from '@mui/x-date-pickers/internals/demo';
import { LocalizationProvider } from '@mui/x-date-pickers/LocalizationProvider';
import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs';
import { DateTimePicker } from '@mui/x-date-pickers/DateTimePicker';

const currentDate = new Date();
// import {DateTimePickerProps, InputProps } from '@mui/lab';

import dayjs, { Dayjs } from 'dayjs';

interface ListProps {
email?: any
Expand Down Expand Up @@ -57,6 +67,7 @@ const List: React.FC<ListProps> = ({
const [status, setStatus] = useState<Boolean>(false);
const [signedInUserData, setSignedInUserData] = useState<any>(null);
const [isSignedIn, setIsSignedIn] = useState<Boolean>(false);
const [value, setValue] = React.useState<Dayjs | null>(dayjs('2022-04-17T15:30'));

useEffect(() => {

Expand Down Expand Up @@ -281,6 +292,10 @@ const List: React.FC<ListProps> = ({
</tr>
) : (
projectTasks.map((v: any, j: any) => {
function dayjs(arg0: string): any {
throw new Error('Function not implemented.');
}

return <tr className={`${(projects.CurrentStageCurrentTask == v.taskName) && (`text-danger`)} ${(expandDetailsTable == i) && (styles.hideDetails)}`} key={j}>
{(v.taskSection == s) ? (
<>
Expand All @@ -302,6 +317,7 @@ const List: React.FC<ListProps> = ({
style={{ paddingLeft: 10, paddingRight: 10, paddingTop: 2, paddingBottom: 2 }}
>
{v.taskName}

</span>
</th>
{(v.taskAssignee == "") ? (
Expand All @@ -312,8 +328,7 @@ const List: React.FC<ListProps> = ({
<MultiSelectChipDropDown
// optionsArray={projectDetails.ProjectMembers}
// taskAssignee={v.taskAssignee}

placeholder="[email protected] , [email protected]"
placeholder=""
options={projectDetails.ProjectMembers}
selectedArrayList={selectedMembers}
setSelectedArrayList={setSelectedMembers}
Expand All @@ -322,8 +337,48 @@ const List: React.FC<ListProps> = ({
/>
</td>
)}

<td>{v.taskDue}</td>
<td>
{/* <DateTimePicker
label="Uncontrolled picker"
defaultValue={value}
/> */}
<LocalizationProvider dateAdapter={AdapterDayjs}>
{/* <DemoContainer components={['DateTimePicker', 'DateTimePicker']}> */}
{/* <DateTimePicker
label="Uncontrolled picker"
defaultValue={dayjs('2022-04-17T15:30')}
/> */}
<DateTimePicker

label=""
value={value}
onChange={(newValue) => setValue(newValue)}
/>
{/* </DemoContainer> */}
</LocalizationProvider>
</td>
{/* <td> */}
{/* <DateTimePicker
label="Uncontrolled picker"
defaultValue={dayjs('2022-04-17T15:30')}
// label="Controlled picker"
// value={value}
// onChange={(newValue) => setValue(newValue)}
/> */}
{/* <LocalizationProvider dateAdapter={AdapterDayjs}>
{/* <DemoContainer components={['DateTimePicker', 'DateTimePicker']}> */}
{/* <DateTimePicker */}
{/* // label="Uncontrolled picker" */}
{/* // defaultValue={dayjs('2022-04-17T15:30')} */}
{/* // /> */}
{/* <DateTimePicker */}
{/* // label="Controlled picker" */}
{/* // value={value} */}
{/* // onChange={(newValue) => setValue(newValue)} */}
{/* // /> */}
{/* </DemoContainer> */}
{/* </LocalizationProvider> */}
{/* </td> */}
{(v.taskPriority == "High") ? (
<td style={{ paddingTop: -20 }}><button type="button" className="btn btn-danger btn-rounded btn-sm">{v.taskPriority}</button></td>
) : (v.taskPriority == "Medium") ? (
Expand Down Expand Up @@ -383,4 +438,5 @@ const List: React.FC<ListProps> = ({
</div>
)
}

export default List;
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ const nextConfig = {
},
};


module.exports = nextConfig;
Loading

1 comment on commit aa4fff5

@vercel
Copy link

@vercel vercel bot commented on aa4fff5 Apr 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.