Skip to content

Commit

Permalink
Remove adminComment/note field from companies
Browse files Browse the repository at this point in the history
  • Loading branch information
juniwbjerde committed Sep 25, 2024
1 parent 932b29f commit b8d9658
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 32 deletions.
5 changes: 0 additions & 5 deletions app/routes/bdb/components/BdbDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -458,11 +458,6 @@ const BdbDetail = () => {
</ul>
</div>

<div className={styles.adminNote}>
<h3>Notat i listen</h3>
{company.adminComment || <EmptyState body="Ingen notater" />}
</div>

<div>
<h3>Bedriftens arrangementer</h3>
{events.length > 0 ? (
Expand Down
13 changes: 5 additions & 8 deletions app/routes/bdb/components/BdbPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down
12 changes: 1 addition & 11 deletions app/routes/bdb/components/CompanyEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ const CompanyEditor = () => {
? {
name: '',
description: '',
adminComment: '',
website: '',
studentContact: undefined,
active: 'true',
Expand All @@ -125,7 +124,6 @@ const CompanyEditor = () => {
: {
name: company.name,
description: company.description,
adminComment: company.adminComment,
website: company.website,
studentContact: studentContact && {
id: studentContact.id,
Expand Down Expand Up @@ -306,15 +304,7 @@ const CompanyEditor = () => {
/>
</MultiSelectGroup>
</div>

<Field
placeholder="Bedriften ønsker kun kurs"
label="Notat fra Bedkom"
name="adminComment"
component={TextEditor.Field}
className={styles.adminNote}
/>


<SubmissionError />
<SubmitButton>{isNew ? 'Opprett' : 'Lagre'}</SubmitButton>
</form>
Expand Down
1 change: 0 additions & 1 deletion app/routes/bdb/components/__tests__/fixtures/companies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ const companies = [
},
],
studentContact: 'Marius Kotlarz',
adminComment: 'Husk logo på alle sider',
},
{
name: 'Facebook',
Expand Down
4 changes: 0 additions & 4 deletions app/routes/bdb/components/bdb.css
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,6 @@
}
}

.adminNote {
width: 400px;
}

.editTitle {
width: 250px;
}
Expand Down
3 changes: 0 additions & 3 deletions app/store/models/Company.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ interface Company {
thumbnail?: string;
semesterStatuses?: SemesterStatus[];
studentContact?: EntityId | null;
adminComment?: string;
paymentMail: string;
comments: EntityId[];
contentTarget: ContentTarget;
Expand Down Expand Up @@ -110,7 +109,6 @@ export type AdminListCompany = Pick<
| 'name'
| 'semesterStatuses'
| 'studentContact'
| 'adminComment'
| 'active'
>;

Expand Down Expand Up @@ -155,7 +153,6 @@ export type AdminDetailCompany = Pick<
| 'contentTarget'
| 'semesterStatuses'
| 'active'
| 'adminComment'
| 'logo'
| 'files'
| 'companyContacts'
Expand Down

0 comments on commit b8d9658

Please sign in to comment.