From c89283319759e0f35dbede24d244259208f27a72 Mon Sep 17 00:00:00 2001 From: Jan Werkhoven Date: Sat, 27 Jan 2024 22:25:37 +1100 Subject: [PATCH 1/2] Allow Interflux Admins to approve companies as ICSF suppliers --- app/models/company.js | 1 + app/pods/secure/companies/company/controller.js | 3 ++- app/pods/secure/companies/company/template.hbs | 9 +++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/app/models/company.js b/app/models/company.js index 6a65c52..db5bef9 100644 --- a/app/models/company.js +++ b/app/models/company.js @@ -25,6 +25,7 @@ export default class CompanyModel extends Model { @attr('number') rankOnGroupWebsite; @attr('number') headCount; @attr('boolean') showMarkets; + @attr('boolean') approvedIcsfSupplier; @belongsTo('country') country; diff --git a/app/pods/secure/companies/company/controller.js b/app/pods/secure/companies/company/controller.js index 65bb7c7..cacbc2c 100644 --- a/app/pods/secure/companies/company/controller.js +++ b/app/pods/secure/companies/company/controller.js @@ -36,7 +36,8 @@ export default class CompanyController extends Controller { } this.company.setProperties({ shownOnMainWebsite: false, - shownOnGroupWebsite: false + shownOnGroupWebsite: false, + approvedIcsfSupplier: false }); this.company.save(); } diff --git a/app/pods/secure/companies/company/template.hbs b/app/pods/secure/companies/company/template.hbs index 14be1ba..c807a1f 100644 --- a/app/pods/secure/companies/company/template.hbs +++ b/app/pods/secure/companies/company/template.hbs @@ -134,6 +134,15 @@ @attribute='shownOnGroupWebsite' @layout='horizontal' /> + + + {{/if}} {{#if company.public}} From ca5d8143d94938f7b9f465c9bac29efbe73e05e4 Mon Sep 17 00:00:00 2001 From: Jan Werkhoven Date: Sat, 27 Jan 2024 22:29:54 +1100 Subject: [PATCH 2/2] Rename for consistency --- app/models/company.js | 2 +- app/pods/secure/companies/company/controller.js | 2 +- app/pods/secure/companies/company/template.hbs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/company.js b/app/models/company.js index db5bef9..4638b92 100644 --- a/app/models/company.js +++ b/app/models/company.js @@ -20,12 +20,12 @@ export default class CompanyModel extends Model { @attr('boolean') isHeadquarter; @attr('boolean') shownOnMainWebsite; @attr('boolean') shownOnGroupWebsite; + @attr('boolean') shownOnIcsfWebsite; @attr('string') coreActivity; @attr('string') history; @attr('number') rankOnGroupWebsite; @attr('number') headCount; @attr('boolean') showMarkets; - @attr('boolean') approvedIcsfSupplier; @belongsTo('country') country; diff --git a/app/pods/secure/companies/company/controller.js b/app/pods/secure/companies/company/controller.js index cacbc2c..12b40b7 100644 --- a/app/pods/secure/companies/company/controller.js +++ b/app/pods/secure/companies/company/controller.js @@ -37,7 +37,7 @@ export default class CompanyController extends Controller { this.company.setProperties({ shownOnMainWebsite: false, shownOnGroupWebsite: false, - approvedIcsfSupplier: false + shownOnIcsfWebsite: false }); this.company.save(); } diff --git a/app/pods/secure/companies/company/template.hbs b/app/pods/secure/companies/company/template.hbs index c807a1f..d865962 100644 --- a/app/pods/secure/companies/company/template.hbs +++ b/app/pods/secure/companies/company/template.hbs @@ -139,7 +139,7 @@ @label='Shown on jetfluxer.com?' @legend='Select "yes" if this company is an approved ICSF supplier.' @record={{company}} - @attribute='approvedIcsfSupplier' + @attribute='shownOnIcsfWebsite' @layout='horizontal' />