diff --git a/src/components/MonthlyCalendar/styles.module.css b/src/components/MonthlyCalendar/styles.module.css
index e30eefe..1ee0139 100644
--- a/src/components/MonthlyCalendar/styles.module.css
+++ b/src/components/MonthlyCalendar/styles.module.css
@@ -8,6 +8,10 @@
gap: var(--spacing-sm);
align-items: baseline;
font-size: var(--font-size-sm);
+
+ .spacer {
+ flex-grow: 1;
+ }
}
.monthly-calendar {
diff --git a/src/views/DailyJournal/AvailabilityDialog/index.tsx b/src/views/DailyJournal/AvailabilityDialog/index.tsx
index 60413d6..c464464 100644
--- a/src/views/DailyJournal/AvailabilityDialog/index.tsx
+++ b/src/views/DailyJournal/AvailabilityDialog/index.tsx
@@ -188,7 +188,8 @@ function AvailabilityDialog(props: Props) {
return key === 'FIRST_HALF';
}
if (dialogState.wfhType === 'FULL') {
- return false;
+ // NOTE: So that we can see all options
+ return true;
}
return true;
},
@@ -204,7 +205,8 @@ function AvailabilityDialog(props: Props) {
return key === 'FIRST_HALF';
}
if (dialogState.leaveType === 'FULL') {
- return false;
+ // NOTE: So that we can see all options
+ return true;
}
return true;
},
@@ -221,32 +223,28 @@ function AvailabilityDialog(props: Props) {
contentClassName={styles.modalContent}
className={styles.availabilityDialog}
>
- {dialogState.wfhType !== 'FULL' && (
-
- )}
- {dialogState.leaveType !== 'FULL' && (
-
- {!isTruthyString(dateFromParams) && (
+ {selectedDate !== fullDate && (
(() => {
const deadlines = projects?.flatMap(
(project) => project.deadlines.map((deadline) => ({
@@ -121,7 +102,7 @@ function DeadlineSection(props: Props) {
variant="split"
primaryPreText="Welcome to"
primaryHeading="Daily Standup"
- primaryDescription={formattedDate}
+ primaryDescription={
}
secondaryHeading="Upcoming Events"
secondaryContent={upcomingEvents.map(
(generalEvent, index) => (
diff --git a/src/views/DailyStandup/StartSection/index.tsx b/src/views/DailyStandup/StartSection/index.tsx
index d9f872e..f7f4801 100644
--- a/src/views/DailyStandup/StartSection/index.tsx
+++ b/src/views/DailyStandup/StartSection/index.tsx
@@ -8,6 +8,7 @@ import {
} from 'urql';
import AvailabilityIndicator from '#components/AvailabilityIndicator';
+import Clock from '#components/Clock';
import DisplayPicture from '#components/DisplayPicture';
import {
type JournalLeaveTypeEnum,
@@ -38,16 +39,6 @@ function getUnavailability(
return sum;
}
-const dateFormatter = new Intl.DateTimeFormat(
- [],
- {
- year: 'numeric',
- month: 'short',
- day: 'numeric',
- weekday: 'short',
- },
-);
-
const USERS_AVAILABILITY = gql`
query UsersAvailability {
private {
@@ -64,17 +55,7 @@ const USERS_AVAILABILITY = gql`
}
`;
-interface Props {
- date: string;
-}
-
-function StartSection(props: Props) {
- const {
- date,
- } = props;
-
- const formattedDate = dateFormatter.format(new Date(date));
-
+function StartSection() {
const [usersAvailability] = useQuery<
UsersAvailabilityQuery,
UsersAvailabilityQueryVariables
@@ -83,16 +64,18 @@ function StartSection(props: Props) {
});
// FIXME: need to check how to sort these information
- const sortedUsers = [...(usersAvailability.data?.private.users.items ?? [])].sort(
- (foo, bar) => compareNumber(
- getUnavailability(foo.leaveToday, foo.workFromHomeToday),
- getUnavailability(bar.leaveToday, bar.workFromHomeToday),
- -1,
- ) || compareString(
- foo.displayName,
- bar.displayName,
- ),
- );
+ const sortedUsers = usersAvailability.data?.private.users.items
+ .filter((item) => item.leaveToday || item.workFromHomeToday)
+ .sort(
+ (foo, bar) => compareNumber(
+ getUnavailability(foo.leaveToday, foo.workFromHomeToday),
+ getUnavailability(bar.leaveToday, bar.workFromHomeToday),
+ -1,
+ ) || compareString(
+ foo.displayName,
+ bar.displayName,
+ ),
+ );
return (
}
+ secondaryHeading="Availability"
secondaryContent={sortedUsers?.map((user) => (
{mapId === 'start' && (
-
+
)}
{mapId === 'deadlines' && (
-
+
)}
{mapId !== 'start' && mapId !== 'end' && mapId !== 'deadlines' && (