From 672f20699d0e3c56c2972c3346f2599d75826a58 Mon Sep 17 00:00:00 2001 From: Marjolaine Le Bon <marjolaine@happy-dev.fr> Date: Thu, 6 May 2021 12:10:51 +0200 Subject: [PATCH 1/5] update: projects => add business provider --- src/locales/en.json | 15 ++++++ src/locales/es.json | 15 ++++++ src/locales/fr.json | 15 ++++++ src/styles/index.scss | 1 + src/styles/projects/_index.scss | 48 +++++++++++++++++ .../admin/page-admin-projects-create.pug | 29 +++++++++- .../partials/project/page-project-edit.pug | 54 +++++++++++++++++++ .../partials/project/page-project-profile.pug | 35 ++++++++++++ 8 files changed, 210 insertions(+), 2 deletions(-) create mode 100644 src/styles/projects/_index.scss diff --git a/src/locales/en.json b/src/locales/en.json index 40358714..f298595a 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -204,6 +204,11 @@ "labelCustomer": "Customer name*", "labelCustomerAddress": "Customer address", "labelCaptain": "Project captain*", + "labelBusinessprovider": "Business Input", + "labelBusinessproviderAdd": "Add a Business Provider", + "labelBusinessproviderRemove": "Remove", + "labelBusinessproviderName": "Business Provider Name", + "labelBusinessproviderFee": "Amount of contribution (%)", "buttonSubmit": "Save" }, "edit": { @@ -216,6 +221,10 @@ "labelCaptain": "Captain *", "labelDescription": "Project description", "descriptionHelp": "You can use markdown", + "businessProviderTitle": "Business Provider", + "businessTableHeader1": "Business provider name", + "businessTableHeader2": "Amount of contribution (%)", + "buttonAddBusinessProvider": "Add", "subTitle": "Team members :", "tableHeader1": "Name", "tableHeader2": "Access", @@ -254,6 +263,12 @@ "buttonJoin": "Join the project", "captain": "Captain :", "description": "Description :", + "clientInformations": "Client Informations : ", + "customerName": "Customer name : ", + "customerAddress": "Customer address : ", + "businessProvider": "Business Provider : ", + "businessProviderName": "Business provider name : ", + "businessProviderFee": "Amount of contribution : ", "subTitle": "Team :" } }, diff --git a/src/locales/es.json b/src/locales/es.json index 539883bb..2fb08348 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -204,6 +204,11 @@ "labelCustomer": "Nombre del/la clientx *", "labelCustomerAddress": "Dirección del/la clientx", "labelCaptain": "LÃder del proyecto *", + "labelBusinessprovider": "Contribución empresarial", + "labelBusinessproviderAdd": "Eliminar", + "labelBusinessproviderRemove": "Añadir la entrada del negocio", + "labelBusinessproviderName": "Nombre del contribuyente empresarial", + "labelBusinessproviderFee": "Importe de la contribución (%)", "buttonSubmit": "Guardar" }, "edit": { @@ -216,6 +221,10 @@ "labelCaptain": "Capitain *", "labelDescription": "Descripción del proyecto", "descriptionHelp": "Puedes usar markdown", + "businessProviderTitle": "Contribución empresarial", + "businessTableHeader1": "Nombre del contribuyente empresarial", + "businessTableHeader2": "Importe de la contribución (%)", + "buttonAddBusinessProvider": "Añadir", "subTitle": "Lista de miembrxs: ", "tableHeader1": "Nombre", "tableHeader2": "Acceso", @@ -254,6 +263,12 @@ "buttonJoin": "Unirse al proyecto", "captain": "LÃder : ", "description": "Descripción :", + "clientInformations": "información al clientx : ", + "customerName": "Nombre del/la clientx : ", + "customerAddress": "Dirección del/la clientx : ", + "businessProvider": "Contribución empresarial : ", + "businessProviderName": "Nombre del contribuyente empresarial : ", + "businessProviderFee": "Importe de la contribución : ", "subTitle": "Equipo : " } }, diff --git a/src/locales/fr.json b/src/locales/fr.json index a02276da..4b82e196 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -202,6 +202,11 @@ "labelCustomer": "Nom du client*", "labelCustomerAddress": "Adresse du client", "labelCaptain": "Capitaine du projet*", + "labelBusinessprovider": "Apport d'affaire", + "labelBusinessproviderAdd": "Ajouter de l'apport d'affaire", + "labelBusinessproviderRemove": "Retirer", + "labelBusinessproviderName": "Nom de l'apporteur d'affaire", + "labelBusinessproviderFee": "Montant de l'apport d'affaire (%)", "buttonSubmit": "Enregistrer" }, "edit": { @@ -214,6 +219,10 @@ "labelCaptain": "Capitaine *", "labelDescription": "Description du projet", "descriptionHelp": "Vous pouvez utiliser Markdown", + "businessProviderTitle": "Apport d'affaire", + "businessTableHeader1": "Nom de l'apporteur d'affaire", + "businessTableHeader2": "Montant de l'apport d'affaire (%)", + "buttonAddBusinessProvider": "Ajouter", "subTitle": "Liste des membres :", "tableHeader1": "Nom", "tableHeader2": "Accès", @@ -252,6 +261,12 @@ "buttonJoin": "Rejoindre le projet", "captain": "Capitaine :", "description": "Description :", + "clientInformations": "Informations sur le client : ", + "customerName": "Nom du client : ", + "customerAddress": "Adresse du client : ", + "businessProvider": "Apport d'affaire : ", + "businessProviderName": "Nom de l'apporteur d'affaire : ", + "businessProviderFee": "Montant de l'apport d'affaire : ", "subTitle": "Equipe :" } }, diff --git a/src/styles/index.scss b/src/styles/index.scss index 8ae3a071..98c9fd3a 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -42,6 +42,7 @@ solid-display>div { @import 'chat'; @import 'forms'; @import 'communities'; +@import 'projects'; @import 'admin-circles'; nav#main__menu { diff --git a/src/styles/projects/_index.scss b/src/styles/projects/_index.scss new file mode 100644 index 00000000..5b7cdde0 --- /dev/null +++ b/src/styles/projects/_index.scss @@ -0,0 +1,48 @@ +#admin-projects-create .form solid-multiple-form { + height: 100%; + button { + border: 1px solid var(--color-secondary); + text-transform: uppercase; + color: var(--color-secondary); + background-color: white; + font-weight: 700; + padding: 9px 20px; + font-size: 12px; + line-height: 14px; + border-radius: 16.5px; + } + button:hover { + background-color: var(--color-secondary); + color: white; + } +} +#projects-edit .edit-businessprovider form { + display: table-row; + border-bottom: 1px solid #C9C8C8; + border-right: 1px solid #C9C8C8; + .segment.table-cell { + border-bottom: 1px solid #C9C8C8; + border-right: 1px solid #C9C8C8; + height: 60px; + padding: 10px; + } + [type="submit"] { + float: none; + display: flex; + margin: 19px auto; + color: var(--color-secondary); + background-color: white; + } + [type="submit"]:hover { + background-color: var(--color-secondary); + color: white; + } +} +#projects-information .display-businessprovider { + [name="fee"]:after { + content: " %"; + } + > div > solid-display:not(:first-child) [name="titlebusinessprovider"] { + display: none; + } +} diff --git a/src/views/partials/admin/page-admin-projects-create.pug b/src/views/partials/admin/page-admin-projects-create.pug index 93eb0b0b..f4f481a2 100644 --- a/src/views/partials/admin/page-admin-projects-create.pug +++ b/src/views/partials/admin/page-admin-projects-create.pug @@ -13,6 +13,23 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac div div + solid-widget(name="businessprovider-widget") + template + solid-form.segment.three-quarter.sm-full.margin-right-medium.margin-bottom-small( + data-src="\${value}" + data-holder + naked + fields="name, fee" + + label-name='' + label-fee='' + + class-name="segment two-third padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-fee="segment third padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + + data-trans='label-name=project.create.labelBusinessproviderName;label-fee=project.create.labelBusinessproviderFee' + ) + solid-form.form( data-src=`${getComponent('projects').endpoints.post}` @@ -31,12 +48,19 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac label-description='' label-help='' label-captain='' + label-businessprovider='' class-customer.name='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' class-customer.address='segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' class-description='segment margin-bottom-xxsmall full text-small text-semibold text-uppercase text-color-heading' class-help='segment full text-small margin-bottom-medium padding-left-small' class-linebreak='segment full sm-hidden' + class-businessprovider="segment full margin-bottom-medium" + + multiple-businessprovider + widget-businessprovider="businessprovider-widget" + multiple-businessprovider-add-label='' + multiple-businessprovider-remove-label='' widget-status='solid-form-hidden' value-status='Private' @@ -49,9 +73,10 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac submit-widget="button" next=getRoute('projects', true) - data-trans='label-status=project.create.labelStatus;label-customer.name=project.create.labelCustomer;label-customer.address=project.create.labelCustomerAddress;label-name=project.create.labelName;label-description=project.create.labelDescription;label-captain=project.create.labelCaptain;label-help=project.create.descriptionHelp;submit-button=project.create.buttonSubmit' + data-trans='label-status=project.create.labelStatus;label-customer.name=project.create.labelCustomer;label-customer.address=project.create.labelCustomerAddress;label-businessprovider=project.create.labelBusinessprovider;multiple-businessprovider-add-label=project.create.labelBusinessproviderAdd;multiple-businessprovider-remove-label=project.create.labelBusinessproviderRemove;label-name=project.create.labelName;label-description=project.create.labelDescription;label-captain=project.create.labelCaptain;label-help=project.create.descriptionHelp;submit-button=project.create.buttonSubmit' )&attributes({ - "fields": componentSet.has('invoices') ? "status, customer.name, customer.address, name, captain, description, help, linebreak" : "status, customer.name, name, description, help, captain, linebreak", + "fields": componentSet.has('invoices') ? "status, customer.name, customer.address, name, captain, businessprovider, description, help, linebreak" : "status, customer.name, name, description, help, captain, linebreak", "class-captain": componentSet.has('invoices') ? 'segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' : 'segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal', "class-name": componentSet.has('invoices') ? 'segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' : 'segment margin-bottom-medium half sm-full sm-padding-none text-small text-semibold text-uppercase text-color-heading' }) + diff --git a/src/views/partials/project/page-project-edit.pug b/src/views/partials/project/page-project-edit.pug index 4b193a7b..6a679ca7 100644 --- a/src/views/partials/project/page-project-edit.pug +++ b/src/views/partials/project/page-project-edit.pug @@ -67,6 +67,60 @@ div.segment.full.padding-large.whitespace-normal "class-captain": componentSet.has('invoices') ? 'segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' : 'segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal', "class-name": componentSet.has('invoices') ? 'segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' : 'segment margin-bottom-medium half sm-full sm-padding-none text-small text-semibold text-uppercase text-color-heading' }) + if componentSet.has("invoices") + h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.edit.businessProviderTitle') + + .segment.table-wrapper.margin-top-medium + .table + div.table-header.bg-color-third.text-color-heading + div.segment.table-cell.third(data-trans='project.edit.businessTableHeader1') + div.segment.table-cell.third(data-trans='project.edit.businessTableHeader2') + div.segment.table-cell.third + + solid-display( + bind-resources + class='table-body' + nested-field='businessprovider' + fields='segment1(name), segment2(fee), remove' + + class-segment1='segment table-cell third text-center' + class-segment2='segment table-cell third text-center' + class-remove='segment table-cell third text-center' + + class-name='text-small text-semibold' + class-fee='text-small text-semibold' + + multiple-businessprovider + multiple-businessprovider-fields="name, fee" + + action-remove='remove' + widget-remove='hubl-circle-edit-members-delete' + ) + + solid-form.form.table-body.edit-businessprovider( + bind-resources + class='table-body' + nested-field='businessprovider' + fields='segment1(name), segment2(fee)' + + placeholder-name="" + placeholder-fee="" + + class-segment1='segment table-cell third text-center' + class-segment2='segment table-cell third text-center' + + class-name="segment full text-small" + class-fee="segment full text-small" + + widget-name="solid-form-placeholder-text" + widget-fee="solid-form-placeholder-text" + + submit-button='' + submit-widget="button" + + data-trans='submit-button=project.edit.buttonAddBusinessProvider;placeholder-name=project.edit.businessTableHeader1;placeholder-fee=project.edit.businessTableHeader2' + ) + h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.edit.subTitle') diff --git a/src/views/partials/project/page-project-profile.pug b/src/views/partials/project/page-project-profile.pug index ca86e47c..b7850c8c 100644 --- a/src/views/partials/project/page-project-profile.pug +++ b/src/views/partials/project/page-project-profile.pug @@ -102,6 +102,41 @@ div( class-description='segment margin-bottom-large whitespace-normal' widget-description='solid-display-value-markdown' ) + + if componentSet.has("invoices") + h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.profile.clientInformations') + + solid-display.segment.full.labelled-avatar.two-lines.whitespace-normal.children.children-full.sm-children-full.margin-bottom-medium( + bind-resources + fields='customerName(titlecustomername, customer.name), customerAddress(titlecustomeraddress, customer.address)' + + value-titlecustomername='' + value-titlecustomeraddress='' + + class-customerName="segment block" + class-customerAddress="segment block margin-top-small margin-bottom-medium whitespace-normal" + class-titlecustomername="text-semibold text-color-heading margin-right-xxsmall" + class-titlecustomeraddress="text-semibold text-color-heading margin-right-xxsmall" + + data-trans='value-titlecustomername=project.profile.customerName;value-titlecustomeraddress=project.profile.customerAddress' + ) + solid-display.segment.block.full.labelled-avatar.two-lines.whitespace-normal.children.children-full.sm-children-full.children-margin-bottom-medium.display-businessprovider( + bind-resources + nested-field='businessprovider' + fields='titlebusinessprovider, businessProvider(businessProviderName(titlebusinessprovidername, name), businessProviderFee(titlebusinessproviderfee, fee))' + + value-titlebusinessprovider='' + value-titlebusinessprovidername='' + value-titlebusinessproviderfee='' + + class-businessProviderName="segment block margin-bottom-xxsmall" + class-businessProviderFee="segment block margin-bottom-small" + class-titlebusinessprovider="segment block text-color-heading text-bold text-letter-spacing-large text-xlarge margin-top-medium margin-bottom-small" + class-titlebusinessprovidername="text-semibold text-color-heading margin-right-xxsmall" + class-titlebusinessproviderfee="text-semibold text-color-heading margin-right-xxsmall" + + data-trans='value-titlebusinessprovider=project.profile.businessProvider;value-titlebusinessprovidername=project.profile.businessProviderName;value-titlebusinessproviderfee=project.profile.businessProviderFee' + ) h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.profile.subTitle') -- GitLab From 6849f3d1fb3f861e9d37feed608fc21926f86af5 Mon Sep 17 00:00:00 2001 From: Marjolaine Le Bon <marjolaine@happy-dev.fr> Date: Thu, 6 May 2021 15:35:47 +0200 Subject: [PATCH 2/5] update: simplify display business provider on profile project --- src/locales/en.json | 6 ++---- src/locales/es.json | 4 +--- src/locales/fr.json | 4 +--- src/styles/projects/_index.scss | 4 ++++ .../partials/project/page-project-profile.pug | 16 ++++++---------- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index f298595a..1cb489dd 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -221,7 +221,7 @@ "labelCaptain": "Captain *", "labelDescription": "Project description", "descriptionHelp": "You can use markdown", - "businessProviderTitle": "Business Provider", + "businessProviderTitle": "Business Provider : ", "businessTableHeader1": "Business provider name", "businessTableHeader2": "Amount of contribution (%)", "buttonAddBusinessProvider": "Add", @@ -265,10 +265,8 @@ "description": "Description :", "clientInformations": "Client Informations : ", "customerName": "Customer name : ", - "customerAddress": "Customer address : ", + "customerAddress": "Customer address : ", "businessProvider": "Business Provider : ", - "businessProviderName": "Business provider name : ", - "businessProviderFee": "Amount of contribution : ", "subTitle": "Team :" } }, diff --git a/src/locales/es.json b/src/locales/es.json index 2fb08348..4f9bb28a 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -221,7 +221,7 @@ "labelCaptain": "Capitain *", "labelDescription": "Descripción del proyecto", "descriptionHelp": "Puedes usar markdown", - "businessProviderTitle": "Contribución empresarial", + "businessProviderTitle": "Contribución empresarial : ", "businessTableHeader1": "Nombre del contribuyente empresarial", "businessTableHeader2": "Importe de la contribución (%)", "buttonAddBusinessProvider": "Añadir", @@ -267,8 +267,6 @@ "customerName": "Nombre del/la clientx : ", "customerAddress": "Dirección del/la clientx : ", "businessProvider": "Contribución empresarial : ", - "businessProviderName": "Nombre del contribuyente empresarial : ", - "businessProviderFee": "Importe de la contribución : ", "subTitle": "Equipo : " } }, diff --git a/src/locales/fr.json b/src/locales/fr.json index 4b82e196..425efe4e 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -219,7 +219,7 @@ "labelCaptain": "Capitaine *", "labelDescription": "Description du projet", "descriptionHelp": "Vous pouvez utiliser Markdown", - "businessProviderTitle": "Apport d'affaire", + "businessProviderTitle": "Apport d'affaire : ", "businessTableHeader1": "Nom de l'apporteur d'affaire", "businessTableHeader2": "Montant de l'apport d'affaire (%)", "buttonAddBusinessProvider": "Ajouter", @@ -265,8 +265,6 @@ "customerName": "Nom du client : ", "customerAddress": "Adresse du client : ", "businessProvider": "Apport d'affaire : ", - "businessProviderName": "Nom de l'apporteur d'affaire : ", - "businessProviderFee": "Montant de l'apport d'affaire : ", "subTitle": "Equipe :" } }, diff --git a/src/styles/projects/_index.scss b/src/styles/projects/_index.scss index 5b7cdde0..04bc4810 100644 --- a/src/styles/projects/_index.scss +++ b/src/styles/projects/_index.scss @@ -39,6 +39,10 @@ } } #projects-information .display-businessprovider { + [name="name"]::after { + content: " - "; + margin-left: 5px; + } [name="fee"]:after { content: " %"; } diff --git a/src/views/partials/project/page-project-profile.pug b/src/views/partials/project/page-project-profile.pug index b7850c8c..5e33c8ef 100644 --- a/src/views/partials/project/page-project-profile.pug +++ b/src/views/partials/project/page-project-profile.pug @@ -120,22 +120,18 @@ div( data-trans='value-titlecustomername=project.profile.customerName;value-titlecustomeraddress=project.profile.customerAddress' ) - solid-display.segment.block.full.labelled-avatar.two-lines.whitespace-normal.children.children-full.sm-children-full.children-margin-bottom-medium.display-businessprovider( + solid-display.segment.block.full.labelled-avatar.two-lines.whitespace-normal.children.children-full.sm-children-full.margin-bottom-medium.display-businessprovider( bind-resources nested-field='businessprovider' - fields='titlebusinessprovider, businessProvider(businessProviderName(titlebusinessprovidername, name), businessProviderFee(titlebusinessproviderfee, fee))' + fields='titlebusinessprovider, businessProvider(name, fee)' value-titlebusinessprovider='' - value-titlebusinessprovidername='' - value-titlebusinessproviderfee='' - class-businessProviderName="segment block margin-bottom-xxsmall" - class-businessProviderFee="segment block margin-bottom-small" - class-titlebusinessprovider="segment block text-color-heading text-bold text-letter-spacing-large text-xlarge margin-top-medium margin-bottom-small" - class-titlebusinessprovidername="text-semibold text-color-heading margin-right-xxsmall" - class-titlebusinessproviderfee="text-semibold text-color-heading margin-right-xxsmall" + class-titlebusinessprovider="segment block text-color-heading text-bold text-letter-spacing-large text-xlarge margin-bottom-small" + class-businessProvider="segment block margin-bottom-xsmall" + class-fee="margin-left-xxsmall" - data-trans='value-titlebusinessprovider=project.profile.businessProvider;value-titlebusinessprovidername=project.profile.businessProviderName;value-titlebusinessproviderfee=project.profile.businessProviderFee' + data-trans='value-titlebusinessprovider=project.profile.businessProvider' ) h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.profile.subTitle') -- GitLab From 3f8c298ed496052f8546b879aaf2c239ec66cbf9 Mon Sep 17 00:00:00 2001 From: Marjolaine Le Bon <marjolaine@happy-dev.fr> Date: Thu, 6 May 2021 12:10:51 +0200 Subject: [PATCH 3/5] update: projects => add business provider --- src/locales/en.json | 15 ++++++ src/locales/es.json | 15 ++++++ src/locales/fr.json | 15 ++++++ src/styles/index.scss | 1 + src/styles/projects/_index.scss | 48 +++++++++++++++++ .../admin/page-admin-projects-create.pug | 29 +++++++++- .../partials/project/page-project-edit.pug | 54 +++++++++++++++++++ .../partials/project/page-project-profile.pug | 35 ++++++++++++ 8 files changed, 210 insertions(+), 2 deletions(-) create mode 100644 src/styles/projects/_index.scss diff --git a/src/locales/en.json b/src/locales/en.json index 40358714..f298595a 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -204,6 +204,11 @@ "labelCustomer": "Customer name*", "labelCustomerAddress": "Customer address", "labelCaptain": "Project captain*", + "labelBusinessprovider": "Business Input", + "labelBusinessproviderAdd": "Add a Business Provider", + "labelBusinessproviderRemove": "Remove", + "labelBusinessproviderName": "Business Provider Name", + "labelBusinessproviderFee": "Amount of contribution (%)", "buttonSubmit": "Save" }, "edit": { @@ -216,6 +221,10 @@ "labelCaptain": "Captain *", "labelDescription": "Project description", "descriptionHelp": "You can use markdown", + "businessProviderTitle": "Business Provider", + "businessTableHeader1": "Business provider name", + "businessTableHeader2": "Amount of contribution (%)", + "buttonAddBusinessProvider": "Add", "subTitle": "Team members :", "tableHeader1": "Name", "tableHeader2": "Access", @@ -254,6 +263,12 @@ "buttonJoin": "Join the project", "captain": "Captain :", "description": "Description :", + "clientInformations": "Client Informations : ", + "customerName": "Customer name : ", + "customerAddress": "Customer address : ", + "businessProvider": "Business Provider : ", + "businessProviderName": "Business provider name : ", + "businessProviderFee": "Amount of contribution : ", "subTitle": "Team :" } }, diff --git a/src/locales/es.json b/src/locales/es.json index 539883bb..2fb08348 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -204,6 +204,11 @@ "labelCustomer": "Nombre del/la clientx *", "labelCustomerAddress": "Dirección del/la clientx", "labelCaptain": "LÃder del proyecto *", + "labelBusinessprovider": "Contribución empresarial", + "labelBusinessproviderAdd": "Eliminar", + "labelBusinessproviderRemove": "Añadir la entrada del negocio", + "labelBusinessproviderName": "Nombre del contribuyente empresarial", + "labelBusinessproviderFee": "Importe de la contribución (%)", "buttonSubmit": "Guardar" }, "edit": { @@ -216,6 +221,10 @@ "labelCaptain": "Capitain *", "labelDescription": "Descripción del proyecto", "descriptionHelp": "Puedes usar markdown", + "businessProviderTitle": "Contribución empresarial", + "businessTableHeader1": "Nombre del contribuyente empresarial", + "businessTableHeader2": "Importe de la contribución (%)", + "buttonAddBusinessProvider": "Añadir", "subTitle": "Lista de miembrxs: ", "tableHeader1": "Nombre", "tableHeader2": "Acceso", @@ -254,6 +263,12 @@ "buttonJoin": "Unirse al proyecto", "captain": "LÃder : ", "description": "Descripción :", + "clientInformations": "información al clientx : ", + "customerName": "Nombre del/la clientx : ", + "customerAddress": "Dirección del/la clientx : ", + "businessProvider": "Contribución empresarial : ", + "businessProviderName": "Nombre del contribuyente empresarial : ", + "businessProviderFee": "Importe de la contribución : ", "subTitle": "Equipo : " } }, diff --git a/src/locales/fr.json b/src/locales/fr.json index a02276da..4b82e196 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -202,6 +202,11 @@ "labelCustomer": "Nom du client*", "labelCustomerAddress": "Adresse du client", "labelCaptain": "Capitaine du projet*", + "labelBusinessprovider": "Apport d'affaire", + "labelBusinessproviderAdd": "Ajouter de l'apport d'affaire", + "labelBusinessproviderRemove": "Retirer", + "labelBusinessproviderName": "Nom de l'apporteur d'affaire", + "labelBusinessproviderFee": "Montant de l'apport d'affaire (%)", "buttonSubmit": "Enregistrer" }, "edit": { @@ -214,6 +219,10 @@ "labelCaptain": "Capitaine *", "labelDescription": "Description du projet", "descriptionHelp": "Vous pouvez utiliser Markdown", + "businessProviderTitle": "Apport d'affaire", + "businessTableHeader1": "Nom de l'apporteur d'affaire", + "businessTableHeader2": "Montant de l'apport d'affaire (%)", + "buttonAddBusinessProvider": "Ajouter", "subTitle": "Liste des membres :", "tableHeader1": "Nom", "tableHeader2": "Accès", @@ -252,6 +261,12 @@ "buttonJoin": "Rejoindre le projet", "captain": "Capitaine :", "description": "Description :", + "clientInformations": "Informations sur le client : ", + "customerName": "Nom du client : ", + "customerAddress": "Adresse du client : ", + "businessProvider": "Apport d'affaire : ", + "businessProviderName": "Nom de l'apporteur d'affaire : ", + "businessProviderFee": "Montant de l'apport d'affaire : ", "subTitle": "Equipe :" } }, diff --git a/src/styles/index.scss b/src/styles/index.scss index 8ae3a071..98c9fd3a 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -42,6 +42,7 @@ solid-display>div { @import 'chat'; @import 'forms'; @import 'communities'; +@import 'projects'; @import 'admin-circles'; nav#main__menu { diff --git a/src/styles/projects/_index.scss b/src/styles/projects/_index.scss new file mode 100644 index 00000000..5b7cdde0 --- /dev/null +++ b/src/styles/projects/_index.scss @@ -0,0 +1,48 @@ +#admin-projects-create .form solid-multiple-form { + height: 100%; + button { + border: 1px solid var(--color-secondary); + text-transform: uppercase; + color: var(--color-secondary); + background-color: white; + font-weight: 700; + padding: 9px 20px; + font-size: 12px; + line-height: 14px; + border-radius: 16.5px; + } + button:hover { + background-color: var(--color-secondary); + color: white; + } +} +#projects-edit .edit-businessprovider form { + display: table-row; + border-bottom: 1px solid #C9C8C8; + border-right: 1px solid #C9C8C8; + .segment.table-cell { + border-bottom: 1px solid #C9C8C8; + border-right: 1px solid #C9C8C8; + height: 60px; + padding: 10px; + } + [type="submit"] { + float: none; + display: flex; + margin: 19px auto; + color: var(--color-secondary); + background-color: white; + } + [type="submit"]:hover { + background-color: var(--color-secondary); + color: white; + } +} +#projects-information .display-businessprovider { + [name="fee"]:after { + content: " %"; + } + > div > solid-display:not(:first-child) [name="titlebusinessprovider"] { + display: none; + } +} diff --git a/src/views/partials/admin/page-admin-projects-create.pug b/src/views/partials/admin/page-admin-projects-create.pug index 93eb0b0b..f4f481a2 100644 --- a/src/views/partials/admin/page-admin-projects-create.pug +++ b/src/views/partials/admin/page-admin-projects-create.pug @@ -13,6 +13,23 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac div div + solid-widget(name="businessprovider-widget") + template + solid-form.segment.three-quarter.sm-full.margin-right-medium.margin-bottom-small( + data-src="\${value}" + data-holder + naked + fields="name, fee" + + label-name='' + label-fee='' + + class-name="segment two-third padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-fee="segment third padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + + data-trans='label-name=project.create.labelBusinessproviderName;label-fee=project.create.labelBusinessproviderFee' + ) + solid-form.form( data-src=`${getComponent('projects').endpoints.post}` @@ -31,12 +48,19 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac label-description='' label-help='' label-captain='' + label-businessprovider='' class-customer.name='segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' class-customer.address='segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' class-description='segment margin-bottom-xxsmall full text-small text-semibold text-uppercase text-color-heading' class-help='segment full text-small margin-bottom-medium padding-left-small' class-linebreak='segment full sm-hidden' + class-businessprovider="segment full margin-bottom-medium" + + multiple-businessprovider + widget-businessprovider="businessprovider-widget" + multiple-businessprovider-add-label='' + multiple-businessprovider-remove-label='' widget-status='solid-form-hidden' value-status='Private' @@ -49,9 +73,10 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac submit-widget="button" next=getRoute('projects', true) - data-trans='label-status=project.create.labelStatus;label-customer.name=project.create.labelCustomer;label-customer.address=project.create.labelCustomerAddress;label-name=project.create.labelName;label-description=project.create.labelDescription;label-captain=project.create.labelCaptain;label-help=project.create.descriptionHelp;submit-button=project.create.buttonSubmit' + data-trans='label-status=project.create.labelStatus;label-customer.name=project.create.labelCustomer;label-customer.address=project.create.labelCustomerAddress;label-businessprovider=project.create.labelBusinessprovider;multiple-businessprovider-add-label=project.create.labelBusinessproviderAdd;multiple-businessprovider-remove-label=project.create.labelBusinessproviderRemove;label-name=project.create.labelName;label-description=project.create.labelDescription;label-captain=project.create.labelCaptain;label-help=project.create.descriptionHelp;submit-button=project.create.buttonSubmit' )&attributes({ - "fields": componentSet.has('invoices') ? "status, customer.name, customer.address, name, captain, description, help, linebreak" : "status, customer.name, name, description, help, captain, linebreak", + "fields": componentSet.has('invoices') ? "status, customer.name, customer.address, name, captain, businessprovider, description, help, linebreak" : "status, customer.name, name, description, help, captain, linebreak", "class-captain": componentSet.has('invoices') ? 'segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' : 'segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal', "class-name": componentSet.has('invoices') ? 'segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' : 'segment margin-bottom-medium half sm-full sm-padding-none text-small text-semibold text-uppercase text-color-heading' }) + diff --git a/src/views/partials/project/page-project-edit.pug b/src/views/partials/project/page-project-edit.pug index 4b193a7b..6a679ca7 100644 --- a/src/views/partials/project/page-project-edit.pug +++ b/src/views/partials/project/page-project-edit.pug @@ -67,6 +67,60 @@ div.segment.full.padding-large.whitespace-normal "class-captain": componentSet.has('invoices') ? 'segment margin-bottom-medium half sm-full padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal' : 'segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading whitespace-normal', "class-name": componentSet.has('invoices') ? 'segment margin-bottom-medium half sm-full padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading' : 'segment margin-bottom-medium half sm-full sm-padding-none text-small text-semibold text-uppercase text-color-heading' }) + if componentSet.has("invoices") + h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.edit.businessProviderTitle') + + .segment.table-wrapper.margin-top-medium + .table + div.table-header.bg-color-third.text-color-heading + div.segment.table-cell.third(data-trans='project.edit.businessTableHeader1') + div.segment.table-cell.third(data-trans='project.edit.businessTableHeader2') + div.segment.table-cell.third + + solid-display( + bind-resources + class='table-body' + nested-field='businessprovider' + fields='segment1(name), segment2(fee), remove' + + class-segment1='segment table-cell third text-center' + class-segment2='segment table-cell third text-center' + class-remove='segment table-cell third text-center' + + class-name='text-small text-semibold' + class-fee='text-small text-semibold' + + multiple-businessprovider + multiple-businessprovider-fields="name, fee" + + action-remove='remove' + widget-remove='hubl-circle-edit-members-delete' + ) + + solid-form.form.table-body.edit-businessprovider( + bind-resources + class='table-body' + nested-field='businessprovider' + fields='segment1(name), segment2(fee)' + + placeholder-name="" + placeholder-fee="" + + class-segment1='segment table-cell third text-center' + class-segment2='segment table-cell third text-center' + + class-name="segment full text-small" + class-fee="segment full text-small" + + widget-name="solid-form-placeholder-text" + widget-fee="solid-form-placeholder-text" + + submit-button='' + submit-widget="button" + + data-trans='submit-button=project.edit.buttonAddBusinessProvider;placeholder-name=project.edit.businessTableHeader1;placeholder-fee=project.edit.businessTableHeader2' + ) + h3.segment.full.padding-bottom-small.border-bottom.border-color-grey.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.edit.subTitle') diff --git a/src/views/partials/project/page-project-profile.pug b/src/views/partials/project/page-project-profile.pug index ca86e47c..b7850c8c 100644 --- a/src/views/partials/project/page-project-profile.pug +++ b/src/views/partials/project/page-project-profile.pug @@ -102,6 +102,41 @@ div( class-description='segment margin-bottom-large whitespace-normal' widget-description='solid-display-value-markdown' ) + + if componentSet.has("invoices") + h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.profile.clientInformations') + + solid-display.segment.full.labelled-avatar.two-lines.whitespace-normal.children.children-full.sm-children-full.margin-bottom-medium( + bind-resources + fields='customerName(titlecustomername, customer.name), customerAddress(titlecustomeraddress, customer.address)' + + value-titlecustomername='' + value-titlecustomeraddress='' + + class-customerName="segment block" + class-customerAddress="segment block margin-top-small margin-bottom-medium whitespace-normal" + class-titlecustomername="text-semibold text-color-heading margin-right-xxsmall" + class-titlecustomeraddress="text-semibold text-color-heading margin-right-xxsmall" + + data-trans='value-titlecustomername=project.profile.customerName;value-titlecustomeraddress=project.profile.customerAddress' + ) + solid-display.segment.block.full.labelled-avatar.two-lines.whitespace-normal.children.children-full.sm-children-full.children-margin-bottom-medium.display-businessprovider( + bind-resources + nested-field='businessprovider' + fields='titlebusinessprovider, businessProvider(businessProviderName(titlebusinessprovidername, name), businessProviderFee(titlebusinessproviderfee, fee))' + + value-titlebusinessprovider='' + value-titlebusinessprovidername='' + value-titlebusinessproviderfee='' + + class-businessProviderName="segment block margin-bottom-xxsmall" + class-businessProviderFee="segment block margin-bottom-small" + class-titlebusinessprovider="segment block text-color-heading text-bold text-letter-spacing-large text-xlarge margin-top-medium margin-bottom-small" + class-titlebusinessprovidername="text-semibold text-color-heading margin-right-xxsmall" + class-titlebusinessproviderfee="text-semibold text-color-heading margin-right-xxsmall" + + data-trans='value-titlebusinessprovider=project.profile.businessProvider;value-titlebusinessprovidername=project.profile.businessProviderName;value-titlebusinessproviderfee=project.profile.businessProviderFee' + ) h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.profile.subTitle') -- GitLab From e335cf5b1f253f8a9fa96989dba9c8f12b6e6c7d Mon Sep 17 00:00:00 2001 From: Marjolaine Le Bon <marjolaine@happy-dev.fr> Date: Thu, 6 May 2021 15:35:47 +0200 Subject: [PATCH 4/5] update: simplify display business provider on profile project --- src/locales/en.json | 6 ++---- src/locales/es.json | 4 +--- src/locales/fr.json | 4 +--- src/styles/projects/_index.scss | 4 ++++ .../partials/project/page-project-profile.pug | 16 ++++++---------- 5 files changed, 14 insertions(+), 20 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index f298595a..1cb489dd 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -221,7 +221,7 @@ "labelCaptain": "Captain *", "labelDescription": "Project description", "descriptionHelp": "You can use markdown", - "businessProviderTitle": "Business Provider", + "businessProviderTitle": "Business Provider : ", "businessTableHeader1": "Business provider name", "businessTableHeader2": "Amount of contribution (%)", "buttonAddBusinessProvider": "Add", @@ -265,10 +265,8 @@ "description": "Description :", "clientInformations": "Client Informations : ", "customerName": "Customer name : ", - "customerAddress": "Customer address : ", + "customerAddress": "Customer address : ", "businessProvider": "Business Provider : ", - "businessProviderName": "Business provider name : ", - "businessProviderFee": "Amount of contribution : ", "subTitle": "Team :" } }, diff --git a/src/locales/es.json b/src/locales/es.json index 2fb08348..4f9bb28a 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -221,7 +221,7 @@ "labelCaptain": "Capitain *", "labelDescription": "Descripción del proyecto", "descriptionHelp": "Puedes usar markdown", - "businessProviderTitle": "Contribución empresarial", + "businessProviderTitle": "Contribución empresarial : ", "businessTableHeader1": "Nombre del contribuyente empresarial", "businessTableHeader2": "Importe de la contribución (%)", "buttonAddBusinessProvider": "Añadir", @@ -267,8 +267,6 @@ "customerName": "Nombre del/la clientx : ", "customerAddress": "Dirección del/la clientx : ", "businessProvider": "Contribución empresarial : ", - "businessProviderName": "Nombre del contribuyente empresarial : ", - "businessProviderFee": "Importe de la contribución : ", "subTitle": "Equipo : " } }, diff --git a/src/locales/fr.json b/src/locales/fr.json index 4b82e196..425efe4e 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -219,7 +219,7 @@ "labelCaptain": "Capitaine *", "labelDescription": "Description du projet", "descriptionHelp": "Vous pouvez utiliser Markdown", - "businessProviderTitle": "Apport d'affaire", + "businessProviderTitle": "Apport d'affaire : ", "businessTableHeader1": "Nom de l'apporteur d'affaire", "businessTableHeader2": "Montant de l'apport d'affaire (%)", "buttonAddBusinessProvider": "Ajouter", @@ -265,8 +265,6 @@ "customerName": "Nom du client : ", "customerAddress": "Adresse du client : ", "businessProvider": "Apport d'affaire : ", - "businessProviderName": "Nom de l'apporteur d'affaire : ", - "businessProviderFee": "Montant de l'apport d'affaire : ", "subTitle": "Equipe :" } }, diff --git a/src/styles/projects/_index.scss b/src/styles/projects/_index.scss index 5b7cdde0..04bc4810 100644 --- a/src/styles/projects/_index.scss +++ b/src/styles/projects/_index.scss @@ -39,6 +39,10 @@ } } #projects-information .display-businessprovider { + [name="name"]::after { + content: " - "; + margin-left: 5px; + } [name="fee"]:after { content: " %"; } diff --git a/src/views/partials/project/page-project-profile.pug b/src/views/partials/project/page-project-profile.pug index b7850c8c..5e33c8ef 100644 --- a/src/views/partials/project/page-project-profile.pug +++ b/src/views/partials/project/page-project-profile.pug @@ -120,22 +120,18 @@ div( data-trans='value-titlecustomername=project.profile.customerName;value-titlecustomeraddress=project.profile.customerAddress' ) - solid-display.segment.block.full.labelled-avatar.two-lines.whitespace-normal.children.children-full.sm-children-full.children-margin-bottom-medium.display-businessprovider( + solid-display.segment.block.full.labelled-avatar.two-lines.whitespace-normal.children.children-full.sm-children-full.margin-bottom-medium.display-businessprovider( bind-resources nested-field='businessprovider' - fields='titlebusinessprovider, businessProvider(businessProviderName(titlebusinessprovidername, name), businessProviderFee(titlebusinessproviderfee, fee))' + fields='titlebusinessprovider, businessProvider(name, fee)' value-titlebusinessprovider='' - value-titlebusinessprovidername='' - value-titlebusinessproviderfee='' - class-businessProviderName="segment block margin-bottom-xxsmall" - class-businessProviderFee="segment block margin-bottom-small" - class-titlebusinessprovider="segment block text-color-heading text-bold text-letter-spacing-large text-xlarge margin-top-medium margin-bottom-small" - class-titlebusinessprovidername="text-semibold text-color-heading margin-right-xxsmall" - class-titlebusinessproviderfee="text-semibold text-color-heading margin-right-xxsmall" + class-titlebusinessprovider="segment block text-color-heading text-bold text-letter-spacing-large text-xlarge margin-bottom-small" + class-businessProvider="segment block margin-bottom-xsmall" + class-fee="margin-left-xxsmall" - data-trans='value-titlebusinessprovider=project.profile.businessProvider;value-titlebusinessprovidername=project.profile.businessProviderName;value-titlebusinessproviderfee=project.profile.businessProviderFee' + data-trans='value-titlebusinessprovider=project.profile.businessProvider' ) h3.text-color-heading.text-bold.text-letter-spacing-large(data-trans='project.profile.subTitle') -- GitLab From 9ce9e7d906b72e9ce8a39ec820ca0f0418d098fc Mon Sep 17 00:00:00 2001 From: Marjolaine Le Bon <marjolaine@happy-dev.fr> Date: Mon, 10 May 2021 11:17:20 +0200 Subject: [PATCH 5/5] update: add a file for the businessprovider creation widget --- .../admin/page-admin-projects-create.pug | 19 +------------------ src/views/partials/widgets.pug | 1 + .../widgets/hubl-project-businessprovider.pug | 17 +++++++++++++++++ 3 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 src/views/partials/widgets/hubl-project-businessprovider.pug diff --git a/src/views/partials/admin/page-admin-projects-create.pug b/src/views/partials/admin/page-admin-projects-create.pug index f4f481a2..102ef9f5 100644 --- a/src/views/partials/admin/page-admin-projects-create.pug +++ b/src/views/partials/admin/page-admin-projects-create.pug @@ -13,23 +13,6 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac div div - solid-widget(name="businessprovider-widget") - template - solid-form.segment.three-quarter.sm-full.margin-right-medium.margin-bottom-small( - data-src="\${value}" - data-holder - naked - fields="name, fee" - - label-name='' - label-fee='' - - class-name="segment two-third padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" - class-fee="segment third padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" - - data-trans='label-name=project.create.labelBusinessproviderName;label-fee=project.create.labelBusinessproviderFee' - ) - solid-form.form( data-src=`${getComponent('projects').endpoints.post}` @@ -58,7 +41,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac class-businessprovider="segment full margin-bottom-medium" multiple-businessprovider - widget-businessprovider="businessprovider-widget" + widget-businessprovider="hubl-project-businessprovider" multiple-businessprovider-add-label='' multiple-businessprovider-remove-label='' diff --git a/src/views/partials/widgets.pug b/src/views/partials/widgets.pug index ee38e845..085d6874 100644 --- a/src/views/partials/widgets.pug +++ b/src/views/partials/widgets.pug @@ -48,6 +48,7 @@ include widgets/hubl-menu-jabberid.pug include widgets/hubl-menu-publicprivate.pug include widgets/hubl-project-admins.pug include widgets/hubl-project-captain.pug +include widgets/hubl-project-businessprovider.pug include widgets/hubl-project-edit-admin.pug include widgets/hubl-project-edit-members-delete.pug include widgets/hubl-project-team-contact.pug diff --git a/src/views/partials/widgets/hubl-project-businessprovider.pug b/src/views/partials/widgets/hubl-project-businessprovider.pug new file mode 100644 index 00000000..cc0c980d --- /dev/null +++ b/src/views/partials/widgets/hubl-project-businessprovider.pug @@ -0,0 +1,17 @@ +if componentSet.has('invoice') && componentSet.has('projects') + solid-widget(name="hubl-project-businessprovider") + template + solid-form.segment.three-quarter.sm-full.margin-right-medium.margin-bottom-small( + data-src="\${value}" + data-holder + naked + fields="name, fee" + + label-name='' + label-fee='' + + class-name="segment two-third padding-right-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + class-fee="segment third padding-left-small sm-padding-none text-small text-semibold text-uppercase text-color-heading" + + data-trans='label-name=project.create.labelBusinessproviderName;label-fee=project.create.labelBusinessproviderFee' + ) -- GitLab