Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introcourse updates for m1-3 and solution #1323

Merged
merged 5 commits into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions content/app/app-dev-course/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ tags: [apps, build, deploy, training]
weight: 15
---

{{% notice warning %}}
**🚧 The course is currently being updated.**
You may still follow the course, but beware that the example solution is being updated along with the modules and will differ slightly from the old solution.
Updated modules will link to the old solution until all modules are updated.
{{% /notice %}}

The intro course is divided into 7 modules and covers a fictional case for Sogndal Municipality.
Each module has a description of the task and links to relevant documentation.

Expand Down
6 changes: 0 additions & 6 deletions content/app/app-dev-course/_index.nb.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ aliases:
weight: 15
---

{{% notice warning %}}
**🚧 Kurset er under oppdatering.**
Du kan fortsatt følge kurset, men vær oppmerksom på at eksempelløsningen blir oppdatert samtidig med modulene og vil avvike noe fra den gamle løsningen.
Oppdaterte moduler vil lenke til den gamle løsningen inntil alle modulene er oppdatert.
{{% /notice %}}

Introkurset er delt opp i 7 moduler og dekker et fiktivt case for Sogndal kommune.
Hver modul har en beskrivelse av oppgaven og lenker til relevant dokumentasjon.

Expand Down
342 changes: 20 additions & 322 deletions content/app/app-dev-course/losningsforslag/_index.en.md

Large diffs are not rendered by default.

334 changes: 20 additions & 314 deletions content/app/app-dev-course/losningsforslag/_index.nb.md

Large diffs are not rendered by default.

Binary file not shown.
27 changes: 15 additions & 12 deletions content/app/app-dev-course/modul1/_index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,12 @@ In Altinn, we currently support three written languages: Norwegian Bokmål, Norw

To manually add support for English in an application, you need to create the file `resources.en.json` in the folder `App/config/texts`:

```json
// File: App/config/texts/resources.en.json
{{< code-title >}}
App/config/texts/resources.en.json
{{< /code-title >}}


```json
{
"language": "en",
"resources": []
Expand Down Expand Up @@ -215,11 +218,13 @@ You can find `<page>.json` in your application repository in the folder `App/ui/
{{% expandsmall id="m1t3q1" header="Do you find the component connected to the email field?" %}}

To locate the component connected to the email field, you can search for 'epost' (email).
You will find the field name connected to the component under `dataModelBindings` (highlighted).
You will find the field name connected to the component under `dataModelBindings.simpleBinding` (highlighted).

```json{linenos=false,hl_lines="9"}
// File: App/ui/layouts/<page>.json
{{< code-title >}}
App/ui/layouts/{page}.json
{{< /code-title >}}

```json{linenos=false,hl_lines="7"}
{
...

Expand Down Expand Up @@ -247,9 +252,11 @@ To make a field optional, you can change `required: true` to `required: false`.

The solution is to change the `type` field from `Input` to `TextArea` (highlighted).

```json{linenos=false,hl_lines="5"}
// File: App/ui/layouts/<page>.json
{{< code-title >}}
App/ui/layouts/{page}.json
{{< /code-title >}}

```json{linenos=false,hl_lines="3"}
{
"id": "mellomnavn",
"type": "TextArea",
Expand All @@ -274,18 +281,14 @@ added a data model, and set up a form page that connects components to fields in
If you have prepared for local development, you have also cloned the application to your local development environment.
The application should be runnable on your local machine with LocalTest, and you should be able to fill in the fields.

<br>
## Solution

{{% expandlarge id="solution" header="Solution" %}}
[Source code Module 1](https://altinn.studio/repos/testdep/flyttemelding-sogndal/src/branch/modul1)<br>
[(Source code Module 1 - Previous version)](https://altinn.studio/repos/ttd/tilflytter-sogndal-lf/src/branch/bolk/1)<br>

{{% notice info %}}
A worked solution is underway.
{{% /notice %}}

{{% /expandlarge %}}

<br><br>

{{% center %}}
Expand Down
30 changes: 17 additions & 13 deletions content/app/app-dev-course/modul1/_index.nb.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Du må utføre de to første oppgavene, opprette applikasjon og legge til datamo
{{% notice info %}}
**MERK**
Du kan utføre alle stegene i denne modulen i Designer.
Det krever imidlertid lokal utvikling å gjennomføre de resterende modulene og for å få en fullt fungerende applikasjon.
Det krever imidlertid lokal utvikling å gjennomføre de øvrige modulene og for å få en fullt fungerende applikasjon.
{{% /notice %}}

**Temaer som dekkes i denne modulen:**
Expand Down Expand Up @@ -161,9 +161,13 @@ I Altinn i dag støtter vi tre skriftspråk: Bokmål, nynorsk og engelsk.

For å manuelt legge til støtte for engelsk i en applikasjon må du opprette filen `resources.en.json` i mappen `App/config/texts`:

```json
// Fil: App/config/texts/resources.en.json
{{< code-title >}}
App/config/texts/resources.en.json
{{< /code-title >}}

```csharp{linenos=false,hl_lines="6"}

```json
{
"language": "en",
"resources": []
Expand Down Expand Up @@ -229,11 +233,13 @@ gitt at du har lastet opp endringene (`<page>` erstattes av navnet til siden, fo
{{% expandsmall id="m1t3q1" header="Finner du igjen komponenten som er koblet til epost-feltet?" %}}

For å finne komponenten som er koblet til epost-feltet kan du søke etter 'epost'.
Navnet på feltet som komponenten er koblet til finner du under `dataModelBindings` (markert).
Navnet på feltet som komponenten er koblet til finner du under `dataModelBindings.simpleBinding` (markert).

```json{linenos=false,hl_lines="9"}
// File: App/ui/layouts/<page>.json
{{< code-title >}}
App/ui/layouts/{page}.json
{{< /code-title >}}

```json{linenos=false,hl_lines="7"}
{
...

Expand Down Expand Up @@ -261,9 +267,11 @@ For å gjøre et felt valgfritt, kan man endre `required: true` til `required: f

Løsningen er å endre `type`-feltet fra `Input` til `TextArea` (markert).

```json{linenos=false,hl_lines="5"}
// File: App/ui/layouts/<page>.json
{{< code-title >}}
App/ui/layouts/{page}.json
{{< /code-title >}}

```json{linenos=false,hl_lines="3"}
{
"id": "mellomnavn",
"type": "TextArea",
Expand All @@ -288,18 +296,14 @@ lagt til en datamodell og satt opp en skjemaside som kobler komponenter til noen
Dersom du har klargjort for lokal utvikling har du i tillegg klonet applikasjonen for å kunne videreutvikle den i ditt lokale utvilkingsmiljø.
Applikasjonen skal kunne kjøres på din lokale maskin med LocalTest og du skal kunne fylle inn feltene.

<br>

{{% expandlarge id="solution" header="Løsningsforslag" %}}
## Løsningsforslag

[Kildekode Modul 1](https://altinn.studio/repos/testdep/flyttemelding-sogndal/src/branch/modul1)<br>
[(Kildekode Modul 1 - tidligere versjon)](https://altinn.studio/repos/ttd/tilflytter-sogndal-lf/src/branch/bolk/1)<br>

{{% notice info %}}
Løsningsforslag kommer
{{% /notice %}}

{{% /expandlarge %}}

<br><br>

Expand Down
Loading