diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Footer/index.tsx b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Actions/index.tsx similarity index 74% rename from SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Footer/index.tsx rename to SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Actions/index.tsx index 5b75acf48..0710bbf07 100644 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Footer/index.tsx +++ b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Actions/index.tsx @@ -1,14 +1,14 @@ -import { DefaultButton, DialogFooter, PrimaryButton } from '@fluentui/react' import * as strings from 'ProjectWebPartsStrings' import React, { FC, useContext } from 'react' -import { DISMISS_CHANGE_PHASE_DIALOG } from '../../..//ProjectPhases/reducer' -import { ProjectPhasesContext } from '../../../ProjectPhases/context' +import { DISMISS_CHANGE_PHASE_DIALOG } from '../../reducer' +import { ProjectPhasesContext } from '../../context' import { useChangePhase } from '../../useChangePhase' import { View } from '../Views' import { ChangePhaseDialogContext } from '../context' import { SET_VIEW } from '../reducer' +import { Button, DialogActions } from '@fluentui/react-components' -export const Footer: FC = () => { +export const Actions: FC = () => { const context = useContext(ProjectPhasesContext) const { state, dispatch } = useContext(ChangePhaseDialogContext) const onChangePhase = useChangePhase() @@ -47,14 +47,18 @@ export const Footer: FC = () => { } return ( - - + {actions.map((buttonProps, index) => ( - + ))} - + ) } diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/ChangePhaseDialog.module.scss b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/ChangePhaseDialog.module.scss index 63e4e4bbf..c8cfc419c 100644 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/ChangePhaseDialog.module.scss +++ b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/ChangePhaseDialog.module.scss @@ -1,5 +1,10 @@ -.root { +.changePhaseDialog { width: 550px; max-width: 550px; - font-weight: 300; + + .dialogContent { + display: flex; + flex-direction: column; + gap: 12px; + } } diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Body/index.tsx b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Content/index.tsx similarity index 92% rename from SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Body/index.tsx rename to SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Content/index.tsx index 2a5441ea4..a2e261e96 100644 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Body/index.tsx +++ b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Content/index.tsx @@ -9,7 +9,7 @@ const VIEW_MAP: Record = { [View.Confirm]: null } -export const Body: FC = () => { +export const Content: FC = () => { const { state } = useContext(ChangePhaseDialogContext) return VIEW_MAP[state.view] ?? null } diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/DynamicHomepageContent/DynamicHomepageContent.module.scss b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/DynamicHomepageContent/DynamicHomepageContent.module.scss deleted file mode 100644 index 8d2190197..000000000 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/DynamicHomepageContent/DynamicHomepageContent.module.scss +++ /dev/null @@ -1,3 +0,0 @@ -.root { - font-weight: 300; -} diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/DynamicHomepageContent/index.tsx b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/DynamicHomepageContent/index.tsx index c700f9d8d..b67404237 100644 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/DynamicHomepageContent/index.tsx +++ b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/DynamicHomepageContent/index.tsx @@ -4,22 +4,20 @@ import { UserMessage } from 'pp365-shared-library/lib/components/UserMessage' import * as strings from 'ProjectWebPartsStrings' import React, { FC, useContext } from 'react' import _ from 'underscore' -import styles from './DynamicHomepageContent.module.scss' export const DynamicHomepageContent: FC = () => { const context = useContext(ProjectPhasesContext) const phaseSitePages = context.state.data.phaseSitePages ?? [] const phaseSitePage = _.find(phaseSitePages, (p) => p.title === context.state.confirmPhase.name) return ( -
- -
+ ) } diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/ChangingPhaseView/index.tsx b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/ChangingPhaseView/index.tsx index c9e5b3a98..8cf11c99b 100644 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/ChangingPhaseView/index.tsx +++ b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/ChangingPhaseView/index.tsx @@ -1,14 +1,18 @@ -import { format, ProgressIndicator } from '@fluentui/react' +import { format } from '@fluentui/react' import { ProjectPhasesContext } from '../../../../ProjectPhases/context' import * as strings from 'ProjectWebPartsStrings' import React, { FC, useContext } from 'react' +import { Field, ProgressBar } from '@fluentui/react-components' export const ChangingPhaseView: FC = () => { const context = useContext(ProjectPhasesContext) return ( - + hint={format(strings.ChangingPhaseDescription, context.state.confirmPhase.name)} + validationState='none' + > + + ) } diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/InitialView.module.scss b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/InitialView.module.scss index 07f44d64e..4e7aefb23 100644 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/InitialView.module.scss +++ b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/InitialView.module.scss @@ -1,14 +1,16 @@ -@import '~@fluentui/react/dist/sass/References.scss'; +@import "~@fluentui/react/dist/sass/References.scss"; .root { - .header { - @include ms-fontSize-14; - } - .commentField { - margin: 10px 0 0 0; + display: flex; + flex-direction: column; + gap: 12px; + + .tabList { + display: flex; + justify-content: space-between; - textarea { - height: 100px; + .tabItem { + cursor: default; } } } diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusActions/StatusActions.module.scss b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusActions/StatusActions.module.scss new file mode 100644 index 000000000..ecc78f810 --- /dev/null +++ b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusActions/StatusActions.module.scss @@ -0,0 +1,7 @@ +.root { + margin: 12px 0; + + .button { + font-weight: var(--fontWeightRegular); + } +} diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusActions/index.tsx b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusActions/index.tsx new file mode 100644 index 000000000..6db17905b --- /dev/null +++ b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusActions/index.tsx @@ -0,0 +1,22 @@ +import React, { FC } from 'react' +import { IStatusActionsProps } from './types' +import styles from './StatusActions.module.scss' +import { Button } from '@fluentui/react-components' + +export const StatusActions: FC = ({ actions }) => { + return ( +
+ {actions.map((action, index) => ( + + ))} +
+ ) +} diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusActions/types.ts b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusActions/types.ts new file mode 100644 index 000000000..9ec40f527 --- /dev/null +++ b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusActions/types.ts @@ -0,0 +1,3 @@ +export interface IStatusActionsProps { + actions: any[] +} diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusOptions/StatusOptions.module.scss b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusOptions/StatusOptions.module.scss deleted file mode 100644 index 4af269786..000000000 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusOptions/StatusOptions.module.scss +++ /dev/null @@ -1,9 +0,0 @@ -@import '~@fluentui/react/dist/sass/References.scss'; - -.root { - margin: 20px 0 25px 0; - - .action { - margin-right: 5px; - } -} diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusOptions/index.tsx b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusOptions/index.tsx deleted file mode 100644 index 6b9a20917..000000000 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusOptions/index.tsx +++ /dev/null @@ -1,16 +0,0 @@ -import { ActionButton } from '@fluentui/react/lib/Button' -import React, { FC } from 'react' -import { IStatusOptionsProps } from './types' -import styles from './StatusOptions.module.scss' - -export const StatusOptions: FC = ({ actions }) => { - return ( -
- {actions.map((opt, key) => ( - - - - ))} -
- ) -} diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusOptions/types.ts b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusOptions/types.ts deleted file mode 100644 index 8228fdfbf..000000000 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/StatusOptions/types.ts +++ /dev/null @@ -1,5 +0,0 @@ -import { IButtonProps } from '@fluentui/react/lib/Button' - -export interface IStatusOptionsProps { - actions: IButtonProps[] -} diff --git a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/index.tsx b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/index.tsx index 70fd39df8..e400c2b22 100644 --- a/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/index.tsx +++ b/SharePointFramework/ProjectWebParts/src/components/ProjectPhases/ChangePhaseDialog/Views/InitialView/index.tsx @@ -1,29 +1,39 @@ -import { TextField } from '@fluentui/react/lib/TextField' import * as strings from 'ProjectWebPartsStrings' import React, { FC } from 'react' import styles from './InitialView.module.scss' -import { StatusOptions } from './StatusOptions' import { useInitialView } from './useInitialView' +import { Field, Label, Tab, TabList, Textarea } from '@fluentui/react-components' +import { StatusActions } from './StatusActions' +import { format } from '@fluentui/react' export const InitialView: FC = () => { - const { checklistItem, setComment, comment, actions } = useInitialView() + const { checklistItem, checklistItems, setComment, comment, actions } = useInitialView() if (!checklistItem) return null return (
-
- {checklistItem.id}. {checklistItem.title} -
- setComment(newValue)} - placeholder={strings.ChecklistCommentPlaceholder} - description={strings.ChecklistCommentDescription} - multiline - value={comment} - resizable={false} - /> - + + {checklistItems.map((item) => ( + + {item.id} + + ))} + + + +