-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add module and env edition pages
- Loading branch information
Showing
13 changed files
with
160 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"page": { | ||
"creation": "Create environment", | ||
"edition": "Edit environment {{environment.name}} of project {{projectName}}" | ||
}, | ||
"name": "Name", | ||
"smallName": "Small name" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"page": { | ||
"creation": "Create module", | ||
"edition": "Edit module {{module.name}} of project {{projectName}}" | ||
}, | ||
"name": "Name" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"page": { | ||
"creation": "Création d'un environnement", | ||
"edition": "Édition de l'environnement {{environment.name}} du projet {{projectName}}" | ||
}, | ||
"name": "Nom", | ||
"smallName": "Nom court" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"page": { | ||
"creation": "Création d'un module", | ||
"edition": "Édition du module {{module.name}} du projet {{projectName}}" | ||
}, | ||
"name": "Nom" | ||
} |
28 changes: 28 additions & 0 deletions
28
modules/ui/src/lib/components/organisms/O_environment/O_environmentEdition.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<script lang="ts"> | ||
import M_inputText from "$lib/components/molecules/M_inputText.svelte"; | ||
import A_button from "$lib/components/atoms/A_button.svelte"; | ||
import {t} from "$lib/services/I18nService"; | ||
import type {Env} from "$lib/domain/Env"; | ||
import {EnvService} from "$lib/services/EnvService"; | ||
export let environment: Env = {} as Env; | ||
export let projectRef; | ||
function save() { | ||
if (environment.id) { | ||
EnvService.updateName(environment); | ||
} else { | ||
EnvService.create(projectRef, environment); | ||
} | ||
} | ||
</script> | ||
|
||
<form on:submit|preventDefault={save}> | ||
<M_inputText label="{$t('environment.name')}" bind:value={environment.name} required="true" placeholder="{$t('environment.name')}"/> | ||
<M_inputText label="{$t('project.smallName')}" bind:value={environment.smallName} required="true" placeholder="{$t('environment.smallName')}"/> | ||
|
||
<A_button label="{$t('common.actions.save')}" type="submit"/> | ||
</form> | ||
|
||
<style> | ||
</style> |
27 changes: 27 additions & 0 deletions
27
modules/ui/src/lib/components/organisms/O_module/O_moduleEdition.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<script lang="ts"> | ||
import M_inputText from "$lib/components/molecules/M_inputText.svelte"; | ||
import A_button from "$lib/components/atoms/A_button.svelte"; | ||
import {t} from "$lib/services/I18nService"; | ||
import type {Module} from "$lib/domain/Module"; | ||
import {ModuleService} from "$lib/services/ModuleService"; | ||
export let module: Module = {} as Module; | ||
export let projectRef; | ||
function save() { | ||
if (module.id) { | ||
ModuleService.updateName(module); | ||
} else { | ||
ModuleService.create(projectRef, module); | ||
} | ||
} | ||
</script> | ||
|
||
<form on:submit|preventDefault={save}> | ||
<M_inputText label="{$t('module.name')}" bind:value={module.name} required="true" placeholder="{$t('module.name')}"/> | ||
|
||
<A_button label="{$t('common.actions.save')}" type="submit"/> | ||
</form> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
Page de creation d'un environnement | ||
<script lang="ts"> | ||
import { t } from '$lib/services/I18nService'; | ||
import {page} from "$app/stores"; | ||
import O_environmentEdition from "$lib/components/organisms/O_environment/O_environmentEdition.svelte"; | ||
let environment = {}; | ||
let projectRef; | ||
$: if($page.params?.project) { | ||
projectRef = $page.params.project; | ||
} | ||
</script> | ||
|
||
{$t('environment.page.creation')} | ||
|
||
<O_environmentEdition {projectRef} {environment} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 16 additions & 1 deletion
17
modules/ui/src/routes/projects/[project]/modules/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
Page de creation d'un module | ||
<script lang="ts"> | ||
import { t } from '$lib/services/I18nService'; | ||
import O_moduleEdition from "$lib/components/organisms/O_module/O_moduleEdition.svelte"; | ||
import {page} from "$app/stores"; | ||
let module = {}; | ||
let projectRef; | ||
$: if($page.params?.project) { | ||
projectRef = $page.params.project; | ||
} | ||
</script> | ||
|
||
{$t('module.page.creation')} | ||
|
||
<O_moduleEdition {projectRef} {module} /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters