Skip to content

Commit

Permalink
feat: send update event on role perm updates on job + grade subject
Browse files Browse the repository at this point in the history
Signed-off-by: Alexander Trost <[email protected]>
  • Loading branch information
galexrt committed Nov 30, 2024
1 parent 9197326 commit b41f95e
Show file tree
Hide file tree
Showing 15 changed files with 485 additions and 68 deletions.
4 changes: 3 additions & 1 deletion app/store/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ export const useAuthStore = defineStore('auth', {
}

try {
const call = getGRPCAuthClient().chooseCharacter({ charId: charId });
const call = getGRPCAuthClient().chooseCharacter({
charId: charId,
});
const { response } = await call;
if (!response.char) {
throw new Error('Server Error! No character in choose character response.');
Expand Down
4 changes: 2 additions & 2 deletions app/store/internet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export interface InternetState {
export const useInternetStore = defineStore('internet', {
state: () =>
({
selectedTab: 0,
selectedTab: undefined,
tabs: [],
history: [],
}) as InternetState,
Expand All @@ -42,7 +42,7 @@ export const useInternetStore = defineStore('internet', {
}
},
async addTab(tab: Partial<Tab>): Promise<number> {
const id = this.tabs.length;
const id = this.tabs.length === 0 ? 1 : this.tabs.length;
this.tabs.push({
id: id,
label: tab.label ?? '',
Expand Down
4 changes: 4 additions & 0 deletions app/store/notificator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ export const useNotificatorStore = defineStore('notifications', {
} else {
logger.warn('Unknown job event data received - Kind: ', resp.data.oneofKind, resp.data);
}
} else if (resp.data.oneofKind === 'jobGradeEvent') {
if (resp.data.jobGradeEvent.data.oneofKind === 'refreshToken') {
await authStore.chooseCharacter(undefined);
}
} else if (resp.data.oneofKind === 'systemEvent') {
logger.warn('No systemEvent handlers available.', resp.data);
} else if (resp.data.oneofKind === 'mailerEvent') {
Expand Down
93 changes: 83 additions & 10 deletions gen/go/proto/resources/notifications/events.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

117 changes: 117 additions & 0 deletions gen/go/proto/resources/notifications/events.pb.validate.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b41f95e

Please sign in to comment.