diff --git a/src/pages/standup/index.tsx b/src/pages/standup/index.tsx
new file mode 100644
index 000000000..82f9f4a67
--- /dev/null
+++ b/src/pages/standup/index.tsx
@@ -0,0 +1,63 @@
+import { FC, memo } from 'react';
+import Head from '@/components/head';
+import Layout from '@/components/Layout';
+import { useRouter } from 'next/router';
+
+import { LOGIN_URL } from '@/constants/url';
+import useAuthenticated from '@/hooks/useAuthenticated';
+import StandUpContainer from '@/components/standup';
+import { useGetUserQuery } from '@/app/services/userApi';
+import { skipToken } from '@reduxjs/toolkit/dist/query';
+import PageNotFound from '../404';
+
+const StandUp: FC = memo(function StandUp() {
+ const { isLoggedIn, isLoading } = useAuthenticated();
+
+ const { isLoading: isAuthenticating } = useGetUserQuery(skipToken);
+ const router = useRouter();
+
+ const { dev } = router.query;
+
+ const handleConditionalRendering = () => {
+ if (!isAuthenticating && isLoggedIn) {
+ if (isLoading) {
+ return
Loading...
;
+ } else if (isLoggedIn) {
+ return
;
+ } else {
+ return (
+
+ );
+ }
+ } else {
+
;
+ }
+ };
+
+ const handleShowStandupComponent = () => {
+ if (dev === 'true') {
+ return (
+
+
+ {handleConditionalRendering()}
+
+ );
+ } else {
+ return
;
+ }
+ };
+
+ return <>{handleShowStandupComponent()}>;
+});
+
+export default StandUp;
diff --git a/src/styles/tasks.module.scss b/src/styles/tasks.module.scss
index cfdd631a0..bd09e144d 100644
--- a/src/styles/tasks.module.scss
+++ b/src/styles/tasks.module.scss
@@ -1,4 +1,5 @@
.container {
+ text-align: center;
display: flex;
flex-direction: column;
margin: 0 auto;
@@ -25,5 +26,10 @@
}
.tabsContainer {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ padding: 1rem;
margin-bottom: 1rem;
+ flex-wrap: wrap;
}
diff --git a/src/types/ProgressUpdates.d.ts b/src/types/ProgressUpdates.d.ts
index 7d8b7c619..9c5cb6f35 100644
--- a/src/types/ProgressUpdates.d.ts
+++ b/src/types/ProgressUpdates.d.ts
@@ -30,3 +30,8 @@ interface question {
export interface formProps {
questions: Array
;
}
+
+export type progressHeaderProps = {
+ totalMissedUpdates: number;
+ updateType: string;
+};
diff --git a/src/types/standup.type.ts b/src/types/standup.type.ts
new file mode 100644
index 000000000..838dc17bf
--- /dev/null
+++ b/src/types/standup.type.ts
@@ -0,0 +1,34 @@
+export type standupUpdateType = {
+ type: string;
+ completed: string;
+ planned: string;
+ blockers: string;
+};
+
+export type InputProps = {
+ placeholder: string;
+ name: string;
+ value: string;
+ dataTestId: string;
+ labelValue: string;
+ htmlFor: string;
+ inputId: string;
+ handleChange: (e: React.ChangeEvent) => void;
+};
+
+export type userDetails = {
+ data: [
+ {
+ blockers: string;
+ completed: string;
+ createdAt: number;
+ date: number;
+ id: string;
+ planned: string;
+ type: string;
+ userId: string;
+ }
+ ];
+ message: string;
+ count: number;
+};
diff --git a/src/utils/getTotalMissedUpdate.ts b/src/utils/getTotalMissedUpdate.ts
new file mode 100644
index 000000000..ae71ddcf4
--- /dev/null
+++ b/src/utils/getTotalMissedUpdate.ts
@@ -0,0 +1,20 @@
+import moment from 'moment';
+
+export function getTotalMissedUpdates(date: Array): number {
+ const currentStandupDate = moment().format('MM DD YYYY');
+ let lastStanup = 0;
+ let totalMissedUpdates = 0;
+ if (date.length === 0) {
+ return totalMissedUpdates;
+ }
+ for (let i = 0; i < date.length; i++) {
+ if (date[i] > lastStanup) {
+ lastStanup = date[i];
+ }
+ }
+ const lastStanupDate = moment(lastStanup).format('MM DD YYYY');
+ const startDate = moment(currentStandupDate, 'MM DD YYYY');
+ const endDate = moment(lastStanupDate, 'MM DD YYYY');
+ totalMissedUpdates = startDate.diff(endDate, 'days');
+ return Number(moment(totalMissedUpdates));
+}