From 2590d488b56079f772cee1029c39f14b0b0f07b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rune=20Moskvil=20Lyng=C3=A5s?= Date: Mon, 20 Jun 2022 08:10:57 +0200 Subject: [PATCH 1/4] =?UTF-8?q?Added=20source=20systems=20`Vigo=20OT`=20an?= =?UTF-8?q?d=20`Vigo=20L=C3=A6rling`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/data/systems.json | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/data/systems.json b/src/data/systems.json index d459603..ff5c6a1 100644 --- a/src/data/systems.json +++ b/src/data/systems.json @@ -23,6 +23,14 @@ "name": "Forrige synkroniseringstidpunkt", "short": "sync" }, + { + "name": "Vigo OT", + "short": "vigoot" + }, + { + "name": "Vigo Lærling", + "short": "vigolaerling" + }, { "name": "Visma HRM", "short": "visma" From 55ce088211511255b748c62ad2a216c27de402fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rune=20Moskvil=20Lyng=C3=A5s?= Date: Mon, 20 Jun 2022 08:11:26 +0200 Subject: [PATCH 2/4] Show correct title for users in `skole` --- src/pages/Detail/index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pages/Detail/index.js b/src/pages/Detail/index.js index 4b72b44..f8f2481 100644 --- a/src/pages/Detail/index.js +++ b/src/pages/Detail/index.js @@ -222,11 +222,8 @@ export const Detail = () => { function getTitle () { if (!user.domain) return '' if (user.domain === 'login') return user.title // employee - if (user.domain === 'skole') { - if (user.office.includes(' Lærling')) return 'Lærling' // apprentice - if (user.office.includes('OT ')) return 'OT-ungdom' // OT - return 'Elev' // student - } + if (user.domain === 'skole' && user.type) return user.type // apprentice, OT or student + return '' } function repackSystemName (name) { From e95e27d910ac537ff17370ac6b37ea28703aa8ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rune=20Moskvil=20Lyng=C3=A5s?= Date: Mon, 27 Jun 2022 10:59:58 +0200 Subject: [PATCH 3/4] Correct casing --- src/data/systems.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/systems.json b/src/data/systems.json index ff5c6a1..97f6e91 100644 --- a/src/data/systems.json +++ b/src/data/systems.json @@ -24,11 +24,11 @@ "short": "sync" }, { - "name": "Vigo OT", + "name": "VIGO OT", "short": "vigoot" }, { - "name": "Vigo Lærling", + "name": "VIGO Opplæring (Lærling)", "short": "vigolaerling" }, { From c75612e3fdcfffc9ae73e3bf204e03137d4caf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rune=20Moskvil=20Lyng=C3=A5s?= Date: Mon, 27 Jun 2022 11:00:08 +0200 Subject: [PATCH 4/4] Use `title` instead of `type` --- src/pages/Detail/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pages/Detail/index.js b/src/pages/Detail/index.js index f8f2481..14736b1 100644 --- a/src/pages/Detail/index.js +++ b/src/pages/Detail/index.js @@ -222,7 +222,7 @@ export const Detail = () => { function getTitle () { if (!user.domain) return '' if (user.domain === 'login') return user.title // employee - if (user.domain === 'skole' && user.type) return user.type // apprentice, OT or student + if (user.domain === 'skole' && user.title) return user.title // apprentice, OT or student return '' }