From e217bc4c076d7c549294e736339eff1929f96cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=ABl=20Mugnier?= Date: Tue, 24 Nov 2020 16:31:47 +0100 Subject: [PATCH] =?UTF-8?q?Update=20-=20Possibilit=C3=A9=20de=20renseigner?= =?UTF-8?q?=20un=20nom=20commercial?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/account/EditProducer.svelte | 18 +++++- src/routes/account/EditStore.svelte | 14 ++++- src/routes/account/mutations.js | 17 +++--- src/routes/register/RegisterOwner.svelte | 1 + src/routes/register/owner/FormCompany.svelte | 59 ++++++++++++-------- 5 files changed, 73 insertions(+), 36 deletions(-) diff --git a/src/routes/account/EditProducer.svelte b/src/routes/account/EditProducer.svelte index 64001e35..2ac9f238 100644 --- a/src/routes/account/EditProducer.svelte +++ b/src/routes/account/EditProducer.svelte @@ -2,7 +2,7 @@ import { UPDATE_PRODUCER } from "./mutations.js"; import { GET_PRODUCER_DETAILS } from "./queries.js"; import { form, bindClass } from '../../../vendors/svelte-forms/src/index'; - import CitySearch from "./../../components/search/CitySearch.svelte"; + import CitySearch from "./../../components/search/CitySearch.svelte"; import ErrorContainer from "./../../components/ErrorContainer.svelte"; import Toggle from "./../../components/controls/Toggle.svelte"; import ProfileForm from "./ProfileForm.svelte"; @@ -10,6 +10,7 @@ export let errorsHandler, userId; let producer = { + name: null, firstName: null, lastName: null, email: null, @@ -25,6 +26,7 @@ }; const producerForm = form(() => ({ + name: { value: producer.name, validators: ['required'], enabled: true }, firstName: { value: producer.firstName, validators: ['required'], enabled: true }, lastName: { value: producer.lastName, validators: ['required'], enabled: true }, email: { value: producer.email, validators: ['required', 'email'], enabled: true }, @@ -41,8 +43,18 @@ getQuery={GET_PRODUCER_DETAILS} {errorsHandler} {userId}> -

{producer.name || "Votre société"}

- +

Votre entreprise

+ +
+
+ + +
+
({ + name: { value: producer.name, validators: ['required'], enabled: true }, firstName: { value: store.firstName, validators: ['required'], enabled: true }, lastName: { value: store.lastName, validators: ['required'], enabled: true }, email: { value: store.email, validators: ['required', 'email'], enabled: true }, @@ -46,8 +48,18 @@ getQuery={GET_STORE_DETAILS} {errorsHandler} {userId}> -

{store.name || "Votre société"}

+

Votre magasin

+
+
+ + +
+
({ name: { value: company.name, validators: ['required'], enabled: true }, vat: { value: vat, validators: ['required'], enabled: !company.notSubjectToVat }, + legalName: { value: company.legals.name, validators: ['required'], enabled: true }, kind: { value: company.legals.kind, validators: ['required'], enabled: true }, email: { value: company.legals.email, validators: ['required', 'email'], enabled: true }, line1: { value: company.legals.address.line1, validators: ['required'], enabled: true }, @@ -77,18 +78,6 @@

Infos générales

-
- - - -
@@ -112,7 +101,39 @@
- + +
+ + + +
+
+ + + +
+ {#if !isStore} +
+ +
+ {/if} {#if !company.notSubjectToVat}
@@ -139,7 +160,7 @@
- {/if} + {/if}
Pays *
- {#if !isStore} -
- -
- {/if}