fix: ensure invoices is here before showing its content

This commit is contained in:
Jean-Baptiste Pasquier 2021-05-20 12:57:50 +02:00
parent c65d868cbe
commit e76753a545
4 changed files with 9 additions and 9 deletions

View File

@ -35,7 +35,7 @@ if componentSet.has("events")
if componentSet.has("events") || componentSet.has("polls") || componentSet.has("resources")
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-conversation@0.11" defer)
if componentSet.has("invoices")
if componentSet.has('invoices') && getRoute('invoices')
script(type="module" src="https://cdn.skypack.dev/@startinblox/component-invoicing@1.3" defer)
//- script(type="module" src="/lib/solid-invoicing/solid-invoicing.js" defer)

View File

@ -76,7 +76,7 @@ div.segment.full.padding-large.sm-padding-xsmall.sm-padding-top-medium.whitespac
data-trans='label-status=project.create.labelStatus;label-projectset=project.create.labelProjectset;label-customerset=project.create.labelCustomerset;label-businessproviderset=project.create.labelBusinessproviderset;label-customer.name=project.create.labelCustomer;label-customer.address=project.create.labelCustomerAddress;label-customer.postcode=project.create.labelCustomerPostcode;label-customer.city=project.create.labelCustomerCity;label-customer.country=project.create.labelCustomerCountry;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, projectset, name, captain, description, help, linebreak, customerset, customer.name, customer.address, customer.postcode, customer.city, customer.country, businessproviderset, businessprovider" : "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'
"fields": (componentSet.has('invoices') && getRoute('invoices')) ? "status, projectset, name, captain, description, help, linebreak, customerset, customer.name, customer.address, customer.postcode, customer.city, customer.country, businessproviderset, businessprovider" : "status, customer.name, name, description, help, captain, linebreak",
"class-captain": (componentSet.has('invoices') && getRoute('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') && getRoute('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

@ -83,12 +83,12 @@ div.segment.full.padding-large.whitespace-normal
data-trans='label-status=project.edit.labelStatus;label-projectset=project.edit.labelProjectset;label-customerset=project.edit.labelCustomerset;label-customer.name=project.edit.labelCustomer;label-customer.address=project.edit.labelCustomerAddress;label-customer.postcode=project.edit.labelCustomerPostcode;label-customer.city=project.edit.labelCustomerCity;label-customer.country=project.edit.labelCustomerCountry;label-name=project.edit.labelName;label-description=project.edit.labelDescription;label-captain=project.edit.labelCaptain;label-help=project.edit.descriptionHelp;submit-button=project.edit.buttonSubmit'
)&attributes({
"fields": componentSet.has('invoices') ? "status, projectset, name, captain, description, help, linebreak, customerset, customer.name, customer.address, customer.postcode, customer.city, customer.country" : "status, name, captain, description, help, customer.name, 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'
"fields": (componentSet.has('invoices') && getRoute('invoices')) ? "status, projectset, name, captain, description, help, linebreak, customerset, customer.name, customer.address, customer.postcode, customer.city, customer.country" : "status, name, captain, description, help, customer.name, linebreak",
"class-captain": (componentSet.has('invoices') && getRoute('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') && getRoute('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")
if componentSet.has('invoices') && getRoute('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

View File

@ -103,7 +103,7 @@ div(
widget-description='solid-display-value-markdown'
)
if componentSet.has("invoices")
if componentSet.has('invoices') && getRoute('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(