Skip to content

Commit

Permalink
feat(core): add level 3
Browse files Browse the repository at this point in the history
  • Loading branch information
dolcalmi committed Dec 1, 2024
1 parent 7c56cfa commit e61bf09
Show file tree
Hide file tree
Showing 18 changed files with 583 additions and 493 deletions.
12 changes: 9 additions & 3 deletions apps/admin-panel/components/account/update.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,19 @@ const AccountUpdate: React.FC<PropType> = ({ auditedAccount }) => {
</button>
</ConfirmForm>
)}
{auditedAccount.level === "TWO" && (
{(auditedAccount.level === "TWO" || auditedAccount.level === "THREE") && (
<ConfirmForm
action={updateLevel}
message="Are you sure you want to downgrade the user to level 1?"
message={`Are you sure you want to downgrade the user to level ${auditedAccount.level === "THREE" ? "2" : "1"}?`}
>
<input type="hidden" name="id" value={auditedAccount.id} />
<input type="hidden" name="level" value={AccountLevel.One} />
<input
type="hidden"
name="level"
value={
auditedAccount.level === "THREE" ? AccountLevel.Two : AccountLevel.One
}
/>
<button className="text-sm mx-4 bg-green-500 hover:bg-green-700 text-white font-bold p-2 border border-green-700 rounded disabled:opacity-50">
{"Downgrade"}
</button>
Expand Down
1 change: 1 addition & 0 deletions apps/admin-panel/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export type AccountDetailPayload = {

export const AccountLevel = {
One: 'ONE',
Three: 'THREE',
Two: 'TWO',
Zero: 'ZERO'
} as const;
Expand Down
1 change: 1 addition & 0 deletions apps/consent/app/graphql/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export type AccountEnableNotificationChannelInput = {

export const AccountLevel = {
One: 'ONE',
Three: 'THREE',
Two: 'TWO',
Zero: 'ZERO'
} as const;
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/services/graphql/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ export type AccountEnableNotificationChannelInput = {

export const AccountLevel = {
One: 'ONE',
Three: 'THREE',
Two: 'TWO',
Zero: 'ZERO'
} as const;
Expand Down
1 change: 1 addition & 0 deletions apps/map/services/galoy/graphql/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ export type AccountEnableNotificationChannelInput = {

export const AccountLevel = {
One: 'ONE',
Three: 'THREE',
Two: 'TWO',
Zero: 'ZERO'
} as const;
Expand Down
Loading

0 comments on commit e61bf09

Please sign in to comment.