update: projects => add business provider

This commit is contained in:
Marjolaine Le Bon 2021-05-06 12:10:51 +02:00 committed by Jean-Baptiste Pasquier
parent 6ca98191e7
commit 3f8c298ed4
8 changed files with 210 additions and 2 deletions

View File

@ -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 :"
}
},

View File

@ -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 : "
}
},

View File

@ -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 :"
}
},

View File

@ -42,6 +42,7 @@ solid-display>div {
@import 'chat';
@import 'forms';
@import 'communities';
@import 'projects';
@import 'admin-circles';
nav#main__menu {

View File

@ -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;
}
}

View File

@ -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'
})

View File

@ -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')

View File

@ -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')