From b0e7a5c2dcd421dd3b4352db0cced6ebd280d468 Mon Sep 17 00:00:00 2001 From: Juni Weisteen Bjerde Date: Wed, 25 Sep 2024 20:26:32 +0200 Subject: [PATCH] Remove adminComment/note field from companies --- app/routes/bdb/components/BdbDetail.tsx | 5 ----- app/routes/bdb/components/BdbPage.tsx | 13 +++++-------- app/routes/bdb/components/CompanyEditor.tsx | 12 +----------- .../bdb/components/__tests__/fixtures/companies.ts | 1 - app/routes/bdb/components/bdb.css | 4 ---- app/store/models/Company.ts | 3 --- 6 files changed, 6 insertions(+), 32 deletions(-) diff --git a/app/routes/bdb/components/BdbDetail.tsx b/app/routes/bdb/components/BdbDetail.tsx index b0c9db8ffe..189a9f0c7b 100644 --- a/app/routes/bdb/components/BdbDetail.tsx +++ b/app/routes/bdb/components/BdbDetail.tsx @@ -458,11 +458,6 @@ const BdbDetail = () => { -
-

Notat i listen

- {company.adminComment || } -
-

Bedriftens arrangementer

{events.length > 0 ? ( diff --git a/app/routes/bdb/components/BdbPage.tsx b/app/routes/bdb/components/BdbPage.tsx index 5de6a6af5f..af1c4f4091 100644 --- a/app/routes/bdb/components/BdbPage.tsx +++ b/app/routes/bdb/components/BdbPage.tsx @@ -222,15 +222,12 @@ const BdbPage = () => { }, }, { - title: 'Notat', - dataIndex: 'comment', + // Using an empty column for filtering + title: '', + dataIndex: 'Filter', centered: false, - maxWidth: 200, - render: (_, company) => company.adminComment, - sorter: (a, b) => - a.adminComment?.localeCompare(b.adminComment || '') || 0, - - // Using the last column for this filtering, even though it's unrelated + maxWidth: 50, + render: () => '', filterIndex: 'active', filter: [ { value: 'true', label: 'Aktiv' }, diff --git a/app/routes/bdb/components/CompanyEditor.tsx b/app/routes/bdb/components/CompanyEditor.tsx index eac964671d..bb8a75687f 100644 --- a/app/routes/bdb/components/CompanyEditor.tsx +++ b/app/routes/bdb/components/CompanyEditor.tsx @@ -113,7 +113,6 @@ const CompanyEditor = () => { ? { name: '', description: '', - adminComment: '', website: '', studentContact: undefined, active: 'true', @@ -125,7 +124,6 @@ const CompanyEditor = () => { : { name: company.name, description: company.description, - adminComment: company.adminComment, website: company.website, studentContact: studentContact && { id: studentContact.id, @@ -306,15 +304,7 @@ const CompanyEditor = () => { />
- - - + {isNew ? 'Opprett' : 'Lagre'} diff --git a/app/routes/bdb/components/__tests__/fixtures/companies.ts b/app/routes/bdb/components/__tests__/fixtures/companies.ts index 74702263fc..0f7f2043f0 100644 --- a/app/routes/bdb/components/__tests__/fixtures/companies.ts +++ b/app/routes/bdb/components/__tests__/fixtures/companies.ts @@ -11,7 +11,6 @@ const companies = [ }, ], studentContact: 'Marius Kotlarz', - adminComment: 'Husk logo på alle sider', }, { name: 'Facebook', diff --git a/app/routes/bdb/components/bdb.css b/app/routes/bdb/components/bdb.css index c387555fd6..6240388e7d 100644 --- a/app/routes/bdb/components/bdb.css +++ b/app/routes/bdb/components/bdb.css @@ -177,10 +177,6 @@ } } -.adminNote { - width: 400px; -} - .editTitle { width: 250px; } diff --git a/app/store/models/Company.ts b/app/store/models/Company.ts index 0ebf0933d6..78a07a28da 100644 --- a/app/store/models/Company.ts +++ b/app/store/models/Company.ts @@ -80,7 +80,6 @@ interface Company { thumbnail?: string; semesterStatuses?: SemesterStatus[]; studentContact?: EntityId | null; - adminComment?: string; paymentMail: string; comments: EntityId[]; contentTarget: ContentTarget; @@ -110,7 +109,6 @@ export type AdminListCompany = Pick< | 'name' | 'semesterStatuses' | 'studentContact' - | 'adminComment' | 'active' >; @@ -155,7 +153,6 @@ export type AdminDetailCompany = Pick< | 'contentTarget' | 'semesterStatuses' | 'active' - | 'adminComment' | 'logo' | 'files' | 'companyContacts'