Skip to content

Commit

Permalink
#48 start struct of add serie
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcellino-Palerme committed Jun 14, 2024
1 parent 6b83b1b commit 264fe6f
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 6 deletions.
81 changes: 76 additions & 5 deletions components/ManageSerie.async.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,82 @@ SPDX-FileCopyrightText: 2024 Marcellino Palerme <[email protected]>

SPDX-License-Identifier: MIT
-->
<script setup lang="ts">

const { t } = useI18n();
const dialog = ref<boolean>(false);


const nameRules = [
(v: string) => !!v || t("message.required"),
(v: string) => (v && v.length <= 3) || t("message.max10"),
];
const nameSerie = ref<string>("");

/**
* Add a new serie
*/
function add() {
console.log("add");
dialog.value = true;
}
</script>

<template>
<v-card
class="justify-center d-flex mx-auto"
color="secondary"
<table-db-action
name-db-table="view_serie"
:add="add"
/>
<v-dialog
v-model="dialog"
max-width="600"
>
<table-db-action name-db-table="view_serie" />
</v-card>
<v-form
validate-on="lazy blur"
/>
<v-card>
<v-card-title>
<span class="headline">Add a new serie</span>
</v-card-title>
<v-card-text>
<v-text-field
v-model="nameSerie"
:counter="10"
:rules="nameRules"
label="t('label.nameSerie')"
hide-details
required
/>
</v-card-text>

<v-expansion-panels>
<v-expansion-panel
:title="t('title.machine')"
>
<v-expansion-panel-text>
helle
</v-expansion-panel-text>
</v-expansion-panel>
<v-expansion-panel
:title="t('title.mother')"
>
<v-expansion-panel-text>
helle
</v-expansion-panel-text>
</v-expansion-panel>
<v-expansion-panel
:title="t('title.daughter')"
>
<v-expansion-panel-text>
helle
</v-expansion-panel-text>
</v-expansion-panel>
</v-expansion-panels>
<v-btn
color="primary"
text="Save"
@click="dialog = false"
/>
</v-card>
</v-dialog>
</template>
1 change: 0 additions & 1 deletion components/TableDb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ async function initTable() {
})
})
.then((resp) => {
console.log(resp);

tableStruct.value = resp;

Expand Down
1 change: 1 addition & 0 deletions lang/en-US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default {
addcompound: "Add reference",
addfitting: "Add fitting",
addmachine: "Add machine",
addview_serie: "Add serie",
archive: "Archive",
control: "Manage control samples",
create: "Create",
Expand Down
1 change: 1 addition & 0 deletions lang/fr-FR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default {
addcompound: "Ajout d'un témoin",
addfitting: "Ajout d'un ajustement",
addmachine: "Ajout d'une machine",
addview_serie: "Ajouter une gamme",
archive: "Archiver",
control: "Gestion témoins",
create: "Créer",
Expand Down

0 comments on commit 264fe6f

Please sign in to comment.