feat: create new markNoShow endpoint (#15738)
* feat: create new markNoShow endpoint * chore: add schema * chore: update name * chore: save progress * refactor: improve code and types * fix: unit test * chore: improvements * chore: move query to booking repository * fix: type error
This commit is contained in:
1 parent
3ab735ba9c
commit
e075dcdeaa
13 files changed
+263
-115
No files matched your search
@@ -178,7 +178,7 @@ export default function Success(props: PageProps) {
|
||||
},
|
||||
});
|
||||
|
||||
const noShowMutation = trpc.viewer.public.noShow.useMutation({
|
||||
const hostNoShowMutation = trpc.viewer.public.markHostAsNoShow.useMutation({
|
||||
onSuccess: async () => {
|
||||
showToast("Thank you, feedback submitted", "success");
|
||||
},
|
||||
@@ -189,7 +189,7 @@ export default function Success(props: PageProps) {
|
||||
|
||||
useEffect(() => {
|
||||
if (noShow) {
|
||||
noShowMutation.mutate({ bookingUid: bookingInfo.uid, noShowHost: true });
|
||||
hostNoShowMutation.mutate({ bookingUid: bookingInfo.uid, noShowHost: true });
|
||||
}
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, []);
|
||||
|
||||
@@ -140,7 +140,7 @@ vi.mock("@calcom/trpc/react", () => ({
|
||||
submitRating: {
|
||||
useMutation: vi.fn(),
|
||||
},
|
||||
noShow: {
|
||||
markHostAsNoShow: {
|
||||
useMutation: vi.fn(),
|
||||
},
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user