feat: pre-existing local changes — fischerei, verband, modules, members, packages
Commits all remaining uncommitted local work: - apps/web: fischerei, verband, modules, members-cms, documents, newsletter, meetings, site-builder, courses, bookings, events, finance pages and components - apps/web: marketing page updates, layout, paths config, next.config.mjs, styles/makerkit.css - apps/web/i18n: documents, fischerei, marketing, verband (de+en) - packages/features: finance, fischerei, member-management, module-builder, newsletter, sitzungsprotokolle, verbandsverwaltung server APIs and components - packages/ui: button.tsx updates - pnpm-lock.yaml
This commit is contained in:
@@ -98,7 +98,7 @@ export function ModuleTable({
|
||||
<thead>
|
||||
<tr className="bg-muted/50 border-b">
|
||||
{onSelectionChange && (
|
||||
<th className="w-10 p-3">
|
||||
<th scope="col" className="w-10 p-3">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={
|
||||
|
||||
@@ -42,9 +42,9 @@ export function createFileService(client: SupabaseClient<Database>) {
|
||||
.from('cms_files')
|
||||
.insert({
|
||||
account_id: input.accountId,
|
||||
record_id: input.recordId ?? null,
|
||||
module_name: input.moduleName ?? null,
|
||||
field_name: input.fieldName ?? null,
|
||||
module_name: input.moduleName ?? '',
|
||||
field_name: input.fieldName ?? '',
|
||||
record_id: input.recordId ?? '',
|
||||
file_name: input.file.name,
|
||||
original_name: input.file.name,
|
||||
mime_type: input.file.type,
|
||||
@@ -89,20 +89,18 @@ export function createFileService(client: SupabaseClient<Database>) {
|
||||
},
|
||||
|
||||
async deleteFile(fileId: string) {
|
||||
const numId = Number(fileId);
|
||||
const { data: file, error: getErr } = await client
|
||||
.from('cms_files')
|
||||
.select('storage_path')
|
||||
.eq('id', fileId)
|
||||
.eq('id', numId)
|
||||
.single();
|
||||
|
||||
if (getErr) throw getErr;
|
||||
|
||||
await client.storage.from('cms-files').remove([file.storage_path]);
|
||||
|
||||
const { error } = await client
|
||||
.from('cms_files')
|
||||
.delete()
|
||||
.eq('id', fileId);
|
||||
const { error } = await client.from('cms_files').delete().eq('id', numId);
|
||||
|
||||
if (error) throw error;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user