mirror of
https://github.com/R0m1k3/LogiFlow.git
synced 2026-10-23 06:58:19 +02:00
Update announcement system to use new dashboard messages table
Refactors the announcement storage and schema to utilize the new `dashboard_messages` table, renaming fields like `priority` to `type` and `groupId` to `storeId`, and updating sorting logic to reflect the new type system. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e437ffed-c31b-44eb-9fd5-b6f9faa8e7ce Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/1957c339-2757-4d1f-8e92-e9f71a1ce58e/e437ffed-c31b-44eb-9fd5-b6f9faa8e7ce/VpUPpsj
This commit is contained in:
1 parent
2659a48e4e
commit
e7b33c5325
4 files changed
+73
-49
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
customerOrders,
|
||||
dlcProducts,
|
||||
tasks,
|
||||
dashboardMessages,
|
||||
announcements,
|
||||
nocodbConfig,
|
||||
invoiceVerificationCache,
|
||||
@@ -3346,6 +3347,22 @@ export class MemStorage implements IStorage {
|
||||
return await announcementStorage.getAnnouncements(groupIds);
|
||||
}
|
||||
|
||||
async getAnnouncement(id: number): Promise<AnnouncementWithRelations | undefined> {
|
||||
const announcementStorage = getAnnouncementStorage(
|
||||
async () => Array.from(this.users.values()),
|
||||
async () => Array.from(this.groups.values())
|
||||
);
|
||||
return await announcementStorage.getAnnouncement(id);
|
||||
}
|
||||
|
||||
async updateAnnouncement(id: number, announcementData: Partial<InsertAnnouncement>): Promise<AnnouncementWithRelations> {
|
||||
const announcementStorage = getAnnouncementStorage(
|
||||
async () => Array.from(this.users.values()),
|
||||
async () => Array.from(this.groups.values())
|
||||
);
|
||||
return await announcementStorage.updateAnnouncement(id, announcementData);
|
||||
}
|
||||
|
||||
async deleteAnnouncement(id: number): Promise<boolean> {
|
||||
const announcementStorage = getAnnouncementStorage(
|
||||
async () => Array.from(this.users.values()),
|
||||
|
||||
Reference in new issue
Block a user