-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main'
- Loading branch information
Showing
9 changed files
with
161 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
with rep := ( | ||
select users::Rep | ||
filter .id = <uuid>$rep_id | ||
), | ||
user := ( | ||
update users::User | ||
filter .id = <uuid>$id | ||
set { | ||
training := ( | ||
select .training { | ||
@created_at := @created_at, | ||
@in_person_created_at := <datetime>$created_at, | ||
@in_person_signed_off_by := assert_exists(rep.id), | ||
} | ||
filter .id = <uuid>$training_id | ||
) | ||
} | ||
) | ||
select assert_exists(user); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// GENERATED by @edgedb/generate v0.5.2 | ||
|
||
import type {Executor} from "edgedb"; | ||
|
||
export type AddInPersonTrainingArgs = { | ||
readonly "rep_id": string; | ||
readonly "training_id": string; | ||
readonly "created_at": Date; | ||
readonly "id": string; | ||
}; | ||
|
||
export type AddInPersonTrainingReturns = { | ||
"id": string; | ||
}; | ||
|
||
export function addInPersonTraining(client: Executor, args: AddInPersonTrainingArgs): Promise<AddInPersonTrainingReturns> { | ||
return client.queryRequiredSingle(`\ | ||
with rep := ( | ||
select users::Rep | ||
filter .id = <uuid>$rep_id | ||
), | ||
user := ( | ||
update users::User | ||
filter .id = <uuid>$id | ||
set { | ||
training := ( | ||
select .training { | ||
@created_at := @created_at, | ||
@in_person_created_at := <datetime>$created_at, | ||
@in_person_signed_off_by := assert_exists(rep.id), | ||
} | ||
filter .id = <uuid>$training_id | ||
) | ||
} | ||
) | ||
select assert_exists(user);`, args); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.