Skip to content

Commit

Permalink
fix: bugs introduced by previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Gobot1234 committed Jun 30, 2024
1 parent 2441de5 commit 1fcb3d5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 3 additions & 3 deletions apps/anvil/src/sign-in/sign-in.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,12 @@ export class SignInService implements OnModuleInit {
sign_ins: {
...e.sign_in.SignIn["*"],
reason: e.sign_in.Reason["*"],
user: {
...PartialUserProps,
user: (user) => ({
...PartialUserProps(user),
...e.is(e.users.Rep, {
teams: { name: true, description: true, id: true },
}),
},
}),
},
queued: {
...e.sign_in.QueuePlace["*"],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { QueueStatus } from "@/components/signin/ActiveLocationSelector/QueueStatus.tsx";
import { StatusBadge } from "@/components/signin/ActiveLocationSelector/StatusBadge.tsx";
import { UserCount } from "@/components/signin/ActiveLocationSelector/UserCount.tsx";
import { cn, toTitleCase } from "@/lib/utils";
import { cn, removeSuffix, toTitleCase } from "@/lib/utils";
import { signinActions } from "@/redux/signin.slice.ts";
import { AppDispatch, AppRootState } from "@/redux/store.ts";
import { locationStatus } from "@/services/signin/locationService.ts";
Expand Down Expand Up @@ -139,9 +139,8 @@ const ActiveLocationSelector = () => {
<p>The space is marked as OPEN when there is at least one rep signed in.</p>
<p>It is closed otherwise.</p>
<p>
Current opening hours are:{" "}
{activeLocationStatus.opening_time.substring(0, activeLocationStatus.opening_time.length - 3)} -{" "}
{activeLocationStatus.closing_time.substring(0, activeLocationStatus.opening_time.length - 3)}
Current opening hours are: {removeSuffix(activeLocationStatus.opening_time, ":00")} -{" "}
{removeSuffix(activeLocationStatus.closing_time, ":00")}
</p>
</TooltipContent>
</Tooltip>
Expand Down
2 changes: 1 addition & 1 deletion apps/forge/src/services/signin/locationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const locationStatus = async (): Promise<{ [KeyT in LocationName]: Partia
}
};

export const dataForLocation = async (location: string): Promise<Location> => {
export const dataForLocation = async (location: LocationName): Promise<Location> => {
try {
const { data } = await axiosInstance.get<Location>(`/location/${location}`);
for (const place of data.queued) {
Expand Down

0 comments on commit 1fcb3d5

Please sign in to comment.