Skip to content

Commit

Permalink
Season code now maps to strings (#481)
Browse files Browse the repository at this point in the history
* Season code now maps to strings

* Moved string mappings to separate component

Still trying to fix this mess
  • Loading branch information
vgeffer committed Dec 13, 2024
1 parent 00e8866 commit 8ce9c33
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {
import {DateTimeField} from '@/components/Admin/custom/DateTimeField'
import {SeasonCodeField} from '@/components/Admin/custom/SeasonCodeField'

import {seasonCodeStrings} from './seasonCodeStrings'

export const SemesterList: FC = () => (
<List>
<Datagrid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
ArrayField,
BooleanField,
Datagrid,
FunctionField,
NumberField,
ReferenceArrayField,
ReferenceField,
Expand All @@ -17,6 +18,8 @@ import {MyShow} from '@/components/Admin/custom/MyShow'
import {SeasonCodeField} from '@/components/Admin/custom/SeasonCodeField'
import {TruncatedTextField} from '@/components/Admin/custom/TruncatedTextField'

import {seasonCodeStrings} from './seasonCodeStrings'

export const SemesterShow: FC = () => (
<MyShow>
<TabbedShowLayout>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export const seasonCodeStrings = [
{id: 0, name: 'Zimný'},
{id: 1, name: 'Letný'},
{id: 2, name: 'Iný'},
]

0 comments on commit 8ce9c33

Please sign in to comment.