From 787582958c98ac1a2be2012b1a1e16acb76acf97 Mon Sep 17 00:00:00 2001 From: Lucio Maranta Date: Wed, 23 Oct 2019 16:48:02 +0200 Subject: [PATCH] Fix style & renamed contacts --- Libs/CMS_CORE_Library.dll | Bin 2882560 -> 2882560 bytes .../Config/customerContactConfigValidator.xsd | 12 ++ Step.Config/Config/maintenancesConfig.xml | 21 +-- .../Config/maintenancesConfigValidator.xsd | 9 +- Step.Config/ServerConfig.cs | 6 +- Step.Config/ServerConfigController.cs | 99 +++++++------ Step.Config/Step.Config.csproj | 6 + Step.Model/Constants.cs | 8 +- .../WebApi/ConfigurationController.cs | 6 +- Step/wwwroot/assets/styles/base/modals.less | 4 +- Step/wwwroot/assets/styles/style.css | 138 +++++++++--------- .../machine/components/contact-info-dialog.ts | 28 +--- .../components/contact-info-dialog.vue | 24 +-- Step/wwwroot/src/services/machineService.ts | 6 +- 14 files changed, 196 insertions(+), 171 deletions(-) create mode 100644 Step.Config/Config/customerContactConfigValidator.xsd diff --git a/Libs/CMS_CORE_Library.dll b/Libs/CMS_CORE_Library.dll index e7d3ad03af8b38ad74f4831206406501fbe7bf7a..2393559ffc4190a40da5d9af829cf3b328264510 100644 GIT binary patch delta 283 zcmZqpv7WI3h$nO~9}L>i*xlOA*xJq1+RfbB&C=S<+S<+5+RfhD&C%M;+1kz3+RfeC z&C}Y=yS1BdC7Xcm+x4-sGuFGcyo)=&r10Rxb{BR&Am#^R0U#CxVj&wuC8Jw+R l!t;x=iwhEyQ)8TcgX5k3gIwc%Je`6ZgCe(I{G_eV2>=JrST_Iw delta 283 zcmZqpv7WI3h$nO~Ki;*pvAeaKv9+72wVS!Mo29jzwY8hAwVS=Qo1?Xxv$dP6wVS)O zo2Rv#cWXD_N;ZM4<_m#d`T0J3EbDEb?5?e9cVXuPVtybN0AfKP76M{nAQk~)Q6Lrr zVsRjr0AfiXmI7jFAeI4QSs<1JVtF7|0AfWTRsv#WAXWilRUlRaVs#+a0Afub*4pmE zuI=#J_tCDUu?#@K1jI6o3=DGwbQtD*(q;$>b_tHx+#s-Zov8n^KgSOEOiGLbN;5cH m#f0Y + + + + + + + + + + + \ No newline at end of file diff --git a/Step.Config/Config/maintenancesConfig.xml b/Step.Config/Config/maintenancesConfig.xml index 948f9e20..6ea4c507 100644 --- a/Step.Config/Config/maintenancesConfig.xml +++ b/Step.Config/Config/maintenancesConfig.xml @@ -1,26 +1,26 @@  - + CMS cms@cms.it - - + + backOffice cms@cms.it 333333333 - - + + Spare part cms@cms.it 333333333 - - + + retrofit cms@cms.it 333333333 - - www.google.it + + www.cms.it 1 @@ -39,4 +39,7 @@ 0 + + + \ No newline at end of file diff --git a/Step.Config/Config/maintenancesConfigValidator.xsd b/Step.Config/Config/maintenancesConfigValidator.xsd index 2aa608af..fe896df0 100644 --- a/Step.Config/Config/maintenancesConfigValidator.xsd +++ b/Step.Config/Config/maintenancesConfigValidator.xsd @@ -3,15 +3,14 @@ - - - - + + + + - diff --git a/Step.Config/ServerConfig.cs b/Step.Config/ServerConfig.cs index a2a452e9..b9081a0e 100644 --- a/Step.Config/ServerConfig.cs +++ b/Step.Config/ServerConfig.cs @@ -15,9 +15,9 @@ namespace Step.Config public static MachineModel MachineConfig; public static List MaintenancesConfig; public static ContactModel ContactConfig; - public static ContactModel SparePartConfig; - public static ContactModel BackOfficeConfig; - public static ContactModel RetrofitConfig; + public static ContactModel Contact1; + public static ContactModel Contact2; + public static ContactModel Contact3; public static string WebSiteUrl; public static List FunctionsAccessConfig; diff --git a/Step.Config/ServerConfigController.cs b/Step.Config/ServerConfigController.cs index abcc74b3..b1e6dae2 100644 --- a/Step.Config/ServerConfigController.cs +++ b/Step.Config/ServerConfigController.cs @@ -55,7 +55,7 @@ namespace Step.Config } } - private static XDocument GetXmlHandlerWithValidator(string configSchemaFilePath, string configFilePath) + private static XDocument GetXmlHandlerWithValidator(string configSchemaFilePath, string configFilePath, bool isFullPath = false) { // Create new instance XmlSchemaSet readerSettings = new XmlSchemaSet(); @@ -73,7 +73,7 @@ namespace Step.Config actualFileName = configFilePath; // Open file reader - XDocument xmlConfigFile = XDocument.Load(BASE_PATH + "\\" + configFilePath); + XDocument xmlConfigFile = XDocument.Load((!isFullPath ? BASE_PATH + "\\": "") + configFilePath); // Validate file xmlConfigFile.Validate(readerSettings, ValidationHandler); @@ -346,7 +346,45 @@ namespace Step.Config // Get Maintenances file handler XDocument xmlConfigFile = GetXmlHandlerWithValidator(MAINTENANCES_CONFIG_SCHEMA_PATH, MAINTENANCES_CONFIG_PATH); - ReadContacts(xmlConfigFile); + ReadAssistanceConfig(); + + Contact2 = xmlConfigFile + .Descendants("contact1") + .Select(x => + new ContactModel() + { + Name = x.Element("name").Value, + Email = x.Element("email").Value, + PhoneNumber = x.Element("phoneNumber").Value + }) + .FirstOrDefault(); + + Contact1 = xmlConfigFile + .Descendants("contact2") + .Select(x => + new ContactModel() + { + Name = x.Element("name").Value, + Email = x.Element("email").Value, + PhoneNumber = x.Element("phoneNumber").Value + }) + .FirstOrDefault(); + + Contact3 = xmlConfigFile + .Descendants("contact3") + .Select(x => + new ContactModel() + { + Name = x.Element("name").Value, + Email = x.Element("email").Value, + PhoneNumber = x.Element("phoneNumber").Value + }) + .FirstOrDefault(); + + WebSiteUrl = xmlConfigFile + .Descendants("webSite") + .Select(x => x.Value) + .FirstOrDefault(); var ci = new CultureInfo("en-US"); var formats = new[] { "M-d-yyyy HH:mm", "dd-MM-yyyy HH:mm", "MM-dd-yyyy HH:mm", "M/d/yyyy HH:mm", "dd/MM/yyyy HH:mm", "MM/dd/yyyy HH:mm" } @@ -374,10 +412,21 @@ namespace Step.Config .ToList(); } - public static void ReadContacts(XDocument xmlConfigFile) + public static void ReadAssistanceConfig() { + string filePath = MAINTENANCES_CONFIG_PATH; + string validator = MAINTENANCES_CONFIG_SCHEMA_PATH; + string key = "assistanceContact"; + if (File.Exists(CUSTOMER_CONTACTS)) + { + validator = CUSTOMER_CONTACTS_CONFIG_SCHEMA_PATH; + filePath = CUSTOMER_CONTACTS; + key = "assistanceConfig"; + } + + XDocument xmlConfigFile = GetXmlHandlerWithValidator(validator, filePath, true); ContactConfig = xmlConfigFile - .Descendants("contact") + .Descendants(key) .Select(x => new ContactModel() { @@ -386,44 +435,6 @@ namespace Step.Config PhoneNumber = x.Element("phoneNumber").Value }) .FirstOrDefault(); - - BackOfficeConfig = xmlConfigFile - .Descendants("backOfficeContact") - .Select(x => - new ContactModel() - { - Name = x.Element("name").Value, - Email = x.Element("email").Value, - PhoneNumber = x.Element("phoneNumber").Value - }) - .FirstOrDefault(); - - SparePartConfig = xmlConfigFile - .Descendants("sparePartsContact") - .Select(x => - new ContactModel() - { - Name = x.Element("name").Value, - Email = x.Element("email").Value, - PhoneNumber = x.Element("phoneNumber").Value - }) - .FirstOrDefault(); - - RetrofitConfig = xmlConfigFile - .Descendants("retrofitContact") - .Select(x => - new ContactModel() - { - Name = x.Element("name").Value, - Email = x.Element("email").Value, - PhoneNumber = x.Element("phoneNumber").Value - }) - .FirstOrDefault(); - - WebSiteUrl = xmlConfigFile - .Descendants("webSite") - .Select(x => x.Value) - .FirstOrDefault(); } private static void ReadNcSoftKeys() @@ -491,7 +502,7 @@ namespace Step.Config { AlarmId = Convert.ToInt32(x.Element("alarmId").Value), PlcId = Convert.ToInt32(x.Element("plcId").Value), - RestoreIsActive = Convert.ToBoolean(x.Element("restoreIsActive").Value) + RestoreIsActive = Convert.ToBoolean(x.Element("restoreIsActive").Value) }) .ToList(); } diff --git a/Step.Config/Step.Config.csproj b/Step.Config/Step.Config.csproj index 8f51832a..8bebe507 100644 --- a/Step.Config/Step.Config.csproj +++ b/Step.Config/Step.Config.csproj @@ -71,6 +71,7 @@ PreserveNewest + Designer PreserveNewest @@ -152,5 +153,10 @@ Designer + + + Designer + + \ No newline at end of file diff --git a/Step.Model/Constants.cs b/Step.Model/Constants.cs index 4d22786f..8da20e7f 100644 --- a/Step.Model/Constants.cs +++ b/Step.Model/Constants.cs @@ -170,8 +170,11 @@ namespace Step.Model public const string AREAS_CONFIG_PATH = CONFIG_DIRECTORY + "areasConfig.xml"; public const string MAINTENANCES_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "maintenancesConfigValidator.xsd"; - public const string MAINTENANCES_CONFIG_PATH = CONFIG_DIRECTORY + "maintenancesConfig.xml"; - + public const string CUSTOMER_CONTACTS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "customerContactConfigValidator.xsd"; + public const string MAINTENANCES_CONFIG_PATH = CONFIG_DIRECTORY + "maintenancesConfig.xml"; + public const string CUSTOMER_CONTACTS = CMS_FOLDER_PATH + "contact.xml"; + + public const string USER_SOFTKEYS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "userSoftKeyConfigValidator.xsd"; public const string USER_SOFTKEYS_CONFIG_PATH = CONFIG_DIRECTORY + "userSoftKeyConfig.xml"; @@ -279,6 +282,7 @@ namespace Step.Model public const string CLIENT_EXE_NAME = @"Active_Client.exe"; public const string CLIENT_EXE_NAME_NOEXT = @"Active_Client"; public const string MAINTENANCE_ATTACHMENT_PATH = @"C:\CMS\Active\attachment\maintenance\"; + public const string CMS_FOLDER_PATH = @"C:\CMS\"; public const string ALARM_ATTACHMENT_PATH = @"C:\CMS\Active\attachment\alarm\"; public const string TEMP_FOLDER = @"C:\CMS\Active\TMP\"; diff --git a/Step/Controllers/WebApi/ConfigurationController.cs b/Step/Controllers/WebApi/ConfigurationController.cs index fcf8c8ea..141ffd33 100644 --- a/Step/Controllers/WebApi/ConfigurationController.cs +++ b/Step/Controllers/WebApi/ConfigurationController.cs @@ -144,9 +144,9 @@ namespace Step.Controllers.WebApi { return Ok(new { ContactConfig, - SparePartConfig, - RetrofitConfig, - BackOfficeConfig, + Contact1, + Contact3, + Contact2, WebSiteUrl }); } diff --git a/Step/wwwroot/assets/styles/base/modals.less b/Step/wwwroot/assets/styles/base/modals.less index 23062c05..bb59a342 100644 --- a/Step/wwwroot/assets/styles/base/modals.less +++ b/Step/wwwroot/assets/styles/base/modals.less @@ -619,6 +619,7 @@ text-align: center; color: @color-greyish-brown; margin-bottom: 30px; + height: 70px; & > * { display: block; margin-bottom: 5px; @@ -639,7 +640,8 @@ } } .contactInfo { - margin-bottom: 75px; + margin-bottom: 55px; + height: 95px; } .btn-success { diff --git a/Step/wwwroot/assets/styles/style.css b/Step/wwwroot/assets/styles/style.css index bab7fd40..b5aabed1 100644 --- a/Step/wwwroot/assets/styles/style.css +++ b/Step/wwwroot/assets/styles/style.css @@ -28,7 +28,7 @@ border: none; background-color: #fff; color: #002680; - top: calc(30%); + top: calc(50% - 20px); right: 14px; font-size: 16px; cursor: pointer; @@ -46,12 +46,12 @@ .modal.m155 { width: 750px; height: 350px; - top: calc(50% - 175px); - left: calc(50% - 375px); + top: calc(50% - 350px / 2); + left: calc(50% - 750px / 2); } .modal.m155.multiple { height: 550px; - top: calc(50% - 275px); + top: calc(50% - 550px / 2); } .modal.m155.multiple .body { height: 399px; @@ -208,8 +208,8 @@ .modal.user-info { width: 600px; height: 610px; - top: calc(50% - 305px); - left: calc(50% - 300px); + top: calc(50% - 610px / 2); + left: calc(50% - 600px / 2); } .modal.login header, .modal.user-info header { @@ -239,8 +239,8 @@ .modal.cmsconnect-info { width: 952px; height: 872px; - top: calc(50% - 436px); - left: calc(50% - 476px); + top: calc(50% - 872px / 2); + left: calc(50% - 952px / 2); color: #4b4b4b; } .modal.cmsconnect-info header { @@ -253,7 +253,7 @@ padding: 0px 23px; } .modal.cmsconnect-info .body { - height: calc(100% - 33px); + height: calc(100% - ((64px/2)+1)); display: flex; width: 100%; } @@ -267,7 +267,7 @@ font-size: 16px; border: 0; height: 62px; - border-bottom: 1px solid #cacaca ; + border-bottom: 1px solid #cacaca; background-color: #e7e7e7; display: flex; align-items: center; @@ -473,8 +473,8 @@ .modal.machine-info { width: 600px; height: 730px; - top: calc(50% - 365px); - left: calc(50% - 300px); + top: calc(50% - 730px / 2); + left: calc(50% - 600px / 2); } .modal.machine-info header { background-color: #002680; @@ -517,8 +517,8 @@ .modal.contact-info { width: 600px; height: 730px; - top: calc(50% - 365px); - left: calc(50% - 300px); + top: calc(50% - 730px / 2); + left: calc(50% - 600px / 2); } .modal.contact-info header { background-color: #002680; @@ -541,6 +541,7 @@ text-align: center; color: #4b4b4b; margin-bottom: 30px; + height: 70px; } .modal.contact-info .details > * { display: block; @@ -560,7 +561,8 @@ border: none; } .modal.contact-info .contactInfo { - margin-bottom: 75px; + margin-bottom: 55px; + height: 95px; } .modal.contact-info .btn-success { height: 30px; @@ -571,8 +573,8 @@ .modal.self-adaptive { width: 750px; height: 350px; - top: calc(50% - 175px); - left: calc(50% - 375px); + top: calc(50% - 350px / 2); + left: calc(50% - 750px / 2); } .modal.self-adaptive header { background-color: #002680; @@ -618,8 +620,8 @@ .modal.loader { width: 896px; height: 453px; - top: calc(50% - 226.5px); - left: calc(50% - 448px); + top: calc(50% - 453px / 2); + left: calc(50% - 896px / 2); } .modal.loader header { background-color: #002680; @@ -798,8 +800,8 @@ .modal.modal-confirm-delete { height: 300px; width: 500px; - top: calc(50% - 150px); - left: calc(50% - 250px); + top: calc(50% - 300px / 2); + left: calc(50% - 500px / 2); } .modal.modal-confirm-delete header { background-color: #002680; @@ -822,8 +824,8 @@ .modal.create-maintenance { width: 896px; height: 696px; - top: calc(50% - 348px); - left: calc(50% - 448px); + top: calc(50% - 696px / 2); + left: calc(50% - 896px / 2); } .modal.create-maintenance header { font-size: 20px; @@ -838,7 +840,7 @@ border: none; background-color: #002680; color: #fff; - top: calc(30%); + top: calc(50% - 20px); right: 14px; font-size: 16px; cursor: pointer; @@ -1129,8 +1131,8 @@ height: 680px; border-radius: 2px; background-color: #fff; - top: calc(50% - 340px); - left: calc(50% - 448px); + top: calc(50% - 680px / 2); + left: calc(50% - 896px / 2); } .modal.info-equipment-box header { font-size: 20px; @@ -1145,7 +1147,7 @@ border: none; background-color: #002680; color: #fff; - top: calc(30%); + top: calc(50% - 20px); right: 14px; font-size: 16px; cursor: pointer; @@ -1306,8 +1308,8 @@ height: 462px; border-radius: 2px; background-color: #fff; - top: calc(50% - 231px); - left: calc(50% - 348px); + top: calc(50% - 462px / 2); + left: calc(50% - 696px / 2); } .modal.load-depot header { font-size: 20px; @@ -1322,7 +1324,7 @@ border: none; background-color: #002680; color: #fff; - top: calc(30%); + top: calc(50% - 20px); right: 14px; font-size: 16px; cursor: pointer; @@ -1369,8 +1371,8 @@ height: 800px; border-radius: 2px; background-color: #fff; - top: calc(50% - 400px); - left: calc(50% - 900px); + top: calc(50% - 800px / 2); + left: calc(50% - 1800px / 2); } .modal.modal-iframe header { font-size: 20px; @@ -1385,7 +1387,7 @@ border: none; background-color: #002680; color: #fff; - top: calc(30%); + top: calc(50% - 20px); right: 14px; font-size: 16px; cursor: pointer; @@ -1396,7 +1398,7 @@ } .modal.modal-iframe iframe { position: absolute; - height: calc(100% - 66px); + height: calc(100% - 64px + 2px); width: 100%; border: none; } @@ -1405,8 +1407,8 @@ height: 800px; border-radius: 2px; background-color: #fff; - top: calc(50% - 400px); - left: calc(50% - 900px); + top: calc(50% - 800px / 2); + left: calc(50% - 1800px / 2); } .modal.modal-image header { font-size: 20px; @@ -1421,7 +1423,7 @@ border: none; background-color: #002680; color: #fff; - top: calc(30%); + top: calc(50% - 20px); right: 14px; font-size: 16px; cursor: pointer; @@ -1448,8 +1450,8 @@ .modal.modal-add-element-queue { width: 1808px; height: 873px; - top: calc(50% - 436.5px); - left: calc(50% - 904px); + top: calc(50% - 873px / 2); + left: calc(50% - 1808px / 2); background-color: #fff; } .modal.modal-load-program header, @@ -1470,7 +1472,7 @@ border: none; background-color: #002680; color: #fff; - top: calc(30%); + top: calc(50% - 20px); right: 14px; font-size: 16px; cursor: pointer; @@ -2099,8 +2101,8 @@ .modal.modal-job-add-parameter { width: 704px; height: 608px; - top: calc(50% - 304px); - left: calc(50% - 352px); + top: calc(50% - 608px / 2); + left: calc(50% - 704px / 2); background-color: #fff; } .modal.modal-job-add-parameter header { @@ -2265,7 +2267,7 @@ height: 872px; border-radius: 2px; top: calc(50% - 392px); - left: calc(50% - 476px); + left: calc(50% - 952px / 2); background-color: #fff; } .modal.modal-edit-job header { @@ -2618,8 +2620,8 @@ width: 896px; height: 472px; border-radius: 2px; - top: calc(50% - 236px); - left: calc(50% - 448px); + top: calc(50% - 472px / 2); + left: calc(50% - 896px / 2); background-color: #fff; } .modal.modal-missing-tools header { @@ -2696,7 +2698,7 @@ height: 670px; border-radius: 2px; top: calc(50% - 335px); - left: calc(50% - 660px); + left: calc(50% - 1320px / 2); background-color: #fff; } .modal.modal-add-offset-tool header { @@ -2925,8 +2927,8 @@ .modal.modal-report-select-column { width: 896px; height: 696px; - top: calc(50% - 348px); - left: calc(50% - 448px); + top: calc(50% - 696px / 2); + left: calc(50% - 896px / 2); background-color: #fff; } .modal.modal-report-select-column header { @@ -3122,8 +3124,8 @@ .modal.create-user { width: 752px; height: 550px; - top: calc(50% - 275px); - left: calc(50% - 376px); + top: calc(50% - 550px / 2); + left: calc(50% - 752px / 2); } .modal.create-user header { font-size: 20px; @@ -3138,7 +3140,7 @@ border: none; background-color: #002680; color: #fff; - top: calc(30%); + top: calc(50% - 20px); right: 14px; font-size: 16px; cursor: pointer; @@ -3409,7 +3411,7 @@ border: none; background-color: #fff; color: #002680; - top: calc(30%); + top: calc(50% - 20px); right: 14px; font-size: 16px; cursor: pointer; @@ -3554,10 +3556,10 @@ textarea { font-family: 'Work Sans', sans-serif; } input:focus { - outline: 5px #1791ff auto ; + outline: 5px #1791ff auto; } select:focus { - outline: 5px #1791ff auto ; + outline: 5px #1791ff auto; } button:focus { outline: none; @@ -4471,7 +4473,7 @@ footer .container button.big:before { display: block; position: absolute; bottom: -8px; - left: calc(42%); + left: calc(50% - 8px); border-radius: 13px; } .turn-up .process-info { @@ -5588,7 +5590,7 @@ footer .container button.big:before { padding: 0px; } .alarm-history-container .alarm-history-body .alarm-history-body-left .alarm-history-table tfoot tr td div.group-label-button button.disabled { - opacity: .65; + opacity: 0.65; cursor: default; box-shadow: none !important; pointer-events: none; @@ -7017,7 +7019,7 @@ footer .container button.big:before { .head-production .detailBoxTransition-leave-active, .head-awj .detailBoxTransition-leave-active { width: 416px; - transition: width .5s; + transition: width 0.5s; overflow: hidden; } .head-spindle .detailBoxTransition-enter, @@ -7027,7 +7029,7 @@ footer .container button.big:before { .head-production .detailBoxTransition-leave-to, .head-awj .detailBoxTransition-leave-to { width: 0; - transition: width .5s; + transition: width 0.5s; } .head-spindle .detailBoxTransition-enter .column-right, .head-production .detailBoxTransition-enter .column-right, @@ -9674,7 +9676,7 @@ footer .container button.big:before { padding: 0px; } .card-report-production .reports-box-body-left .body-left-center .body-left-center-container tfoot tr td div.group-label-button button.disabled { - opacity: .65; + opacity: 0.65; cursor: default; box-shadow: none !important; pointer-events: none; @@ -11043,7 +11045,7 @@ footer .container button.big:before { padding: 0px; } .card-report-alarms .reports-box-body-left .body-left-center .body-left-center-container tfoot tr td div.group-label-button button.disabled { - opacity: .65; + opacity: 0.65; cursor: default; box-shadow: none !important; pointer-events: none; @@ -21058,7 +21060,7 @@ footer .container button.big:before { border-right-color: transparent !important; border-bottom-color: transparent !important; bottom: -16px; - left: calc(45%); + left: calc(50% - 5px); margin-top: 0; margin-bottom: 0; } @@ -21082,7 +21084,7 @@ footer .container button.big:before { border-right-color: transparent !important; border-top-color: transparent !important; top: -16px; - left: calc(45%); + left: calc(50% - 5px); margin-top: 0; margin-bottom: 0; } @@ -21239,12 +21241,12 @@ footer .container button.big:before { .tooltip[aria-hidden='true'] { visibility: hidden; opacity: 0; - transition: opacity .15s, visibility .15s; + transition: opacity 0.15s, visibility 0.15s; } .tooltip[aria-hidden='false'] { visibility: visible; opacity: 1; - transition: opacity .15s; + transition: opacity 0.15s; } /**START - TOOLTIP COLUMN CHART PRODUZIONE**/ .card-report-tooltip-top { @@ -21537,9 +21539,9 @@ body { margin: auto; width: 60vw; height: 60vh; - top: calc(20%); + top: calc(50% - 30vh); position: absolute; - left: calc(20%); + left: calc(50% - 30vw); background-color: white; padding: 10px; } @@ -21557,8 +21559,8 @@ body { position: absolute; width: 200px; height: 200px; - top: calc(50% - 100px); - left: calc(50% - 100px); + top: calc(50% - 200px / 2); + left: calc(50% - 200px / 2); text-align: center; line-height: 200px; font-size: 100px; diff --git a/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts index 61373726..ed945efa 100644 --- a/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts +++ b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.ts @@ -14,23 +14,7 @@ export default class ContactInfoDialog extends Vue { email: "" }; - public retrofitConfig: ContactModel = { - name:"", - phoneNumber: "", - email: "" - }; - - public sparePartConfig: ContactModel = { - name:"", - phoneNumber: "", - email: "" - }; - - public backOfficeConfig: ContactModel = { - name:"", - phoneNumber: "", - email: "" - }; + public contacts: ContactModel[] = [] public webSiteUrl: string = "" @@ -38,10 +22,12 @@ export default class ContactInfoDialog extends Vue { async beforeMount() { var contact = await awaiter(new machineService().getContactConfiguration()); this.contactInfo = contact.contactConfig - this.retrofitConfig = contact.retrofitConfig - this.sparePartConfig = contact.sparePartConfig - this.backOfficeConfig = contact.backOfficeConfig - this.webSiteUrl = contact.webSiteUrl + + this.contacts.push(contact.contact1); + this.contacts.push(contact.contact2); + this.contacts.push(contact.contact3); + this.webSiteUrl = contact.webSiteUrl; + messageService.subscribeToChannel("esc_pressed", args => { this.close(); }); diff --git a/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue index ed671292..2a874583 100644 --- a/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue +++ b/Step/wwwroot/src/app_modules/machine/components/contact-info-dialog.vue @@ -9,20 +9,20 @@ -
-

{{backOfficeConfig.name.toUpperCase()}}

- - +
+

{{contacts[0].name.toUpperCase()}}

+ +
-
-

{{sparePartConfig.name.toUpperCase()}}

- - +
+

{{contacts[1].name.toUpperCase()}}

+ +
-
-

{{retrofitConfig.name.toUpperCase()}}

- - +
+

{{contacts[2].name.toUpperCase()}}

+ +
diff --git a/Step/wwwroot/src/services/machineService.ts b/Step/wwwroot/src/services/machineService.ts index b86334c9..62437303 100644 --- a/Step/wwwroot/src/services/machineService.ts +++ b/Step/wwwroot/src/services/machineService.ts @@ -57,9 +57,9 @@ export interface ClientConfigurationModel { export interface ContactConfigurationModel { contactConfig: ContactModel, - backOfficeConfig: ContactModel, - retrofitConfig: ContactModel, - sparePartConfig: ContactModel, + contact1: ContactModel, + contact2: ContactModel, + contact3: ContactModel, webSiteUrl: string }