From 788ba26b2cf0252efda345bc177057a54942f766 Mon Sep 17 00:00:00 2001 From: Gobot1234 Date: Fri, 11 Oct 2024 11:02:50 +0100 Subject: [PATCH] feat: fix bump related bug love breaking changes in minor version changes --- apps/anvil/src/sign-in/sign-in.service.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/apps/anvil/src/sign-in/sign-in.service.ts b/apps/anvil/src/sign-in/sign-in.service.ts index d9a1a5b..735cbb8 100644 --- a/apps/anvil/src/sign-in/sign-in.service.ts +++ b/apps/anvil/src/sign-in/sign-in.service.ts @@ -270,18 +270,20 @@ export class SignInService implements OnModuleInit { false, ), ), - selectable: e.op( - // if they're a rep they can sign in off shift to use the machines they want even if the reps aren't trained - // ideally first comparison should be `__source__ is users::Rep` + selectable: e.assert_exists( e.op( - e.op(e.op(user.__type__.name, "=", "users::Rep"), "or", e.op(training.rep.id, "in", rep_training.id)), - "and", - e.op("exists", training["@in_person_created_at"]), + // if they're a rep they can sign in off shift to use the machines they want even if the reps aren't trained + // ideally first comparison should be `__source__ is users::Rep` + e.op( + e.op(e.op(user.__type__.name, "=", "users::Rep"), "or", e.op(training.rep.id, "in", rep_training.id)), + "and", + e.op("exists", training["@in_person_created_at"]), + ), + "if", + training.in_person, + "else", + true, ), - "if", - training.in_person, - "else", - true, ), enabled: false, icon_url: true,