diff --git a/webapp/src/components/views/ViewCompaniesData.vue b/webapp/src/components/views/ViewCompaniesData.vue
new file mode 100644
index 0000000..e210a38
--- /dev/null
+++ b/webapp/src/components/views/ViewCompaniesData.vue
@@ -0,0 +1,117 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/webapp/src/components/views/ViewStatePortal.vue b/webapp/src/components/views/ViewStatePortal.vue
index 27c2c09..d90b5ff 100644
--- a/webapp/src/components/views/ViewStatePortal.vue
+++ b/webapp/src/components/views/ViewStatePortal.vue
@@ -71,6 +71,13 @@
Stammdaten-Übersicht
+
+
+ Firmen-Übersicht
+
{
+ window.scrollTo(0, 0);
if(to.name === 'admin') {
useEventBus('hideNavigation').emit(true);
} else {
diff --git a/webapp/src/services/account.service.ts b/webapp/src/services/account.service.ts
index 3ebab17..9db4a28 100644
--- a/webapp/src/services/account.service.ts
+++ b/webapp/src/services/account.service.ts
@@ -31,7 +31,6 @@ export class AccountService {
public static async updateWage(accountId: string, wageFactor: number): Promise {
return COLLECTION.update(accountId, { wageFactor });
}
-
public static async subscribeToAccountChanges(
callback: (data: RecordSubscription)=> void,
): Promise {
diff --git a/webapp/src/services/company.service.ts b/webapp/src/services/company.service.ts
index 4241c61..043ef3b 100644
--- a/webapp/src/services/company.service.ts
+++ b/webapp/src/services/company.service.ts
@@ -1,4 +1,4 @@
-import { RecordAuthResponse } from 'pocketbase';
+import { RecordAuthResponse, RecordSubscription, UnsubscribeFunc } from 'pocketbase';
import { Collections, CompaniesRecord, CompaniesResponse } from '../types/pocketbase.types';
import { PocketbaseService } from './pocketbase.service';
import { useEventBus } from '@vueuse/core';
@@ -43,4 +43,14 @@ export class CompanyService {
public static async getCompanyByAccountNumber(accountNumber: string): Promise {
return COLLECTION.getFirstListItem(`accountNumber="${accountNumber}"`);
}
+ public static async updateAccountNumber(accountId: string, accountNumber: string): Promise {
+ return COLLECTION.update(accountId, { accountNumber });
+ }
+ public static async subscribeToCompanyChanges(
+ callback: (data: RecordSubscription)=> void,
+ ): Promise {
+ return await COLLECTION.subscribe('*', (data) => {
+ callback(data);
+ });
+ }
}
\ No newline at end of file