Added maintenances contact

Fix offsets
This commit is contained in:
Lucio Maranta
2019-06-05 16:54:20 +02:00
parent 96d19f4779
commit a93aaba321
21 changed files with 446 additions and 225 deletions
Binary file not shown.
+169 -162
View File
@@ -1,173 +1,180 @@
<?xml version="1.0" encoding="utf-8"?>
<maintenances>
<maintenance>
<id>1</id>
<localizedName>
<lang langKey="en">5-Axis operating-unit management</lang>
<lang langKey="it">Gestione gruppo operatore 5 assi</lang>
</localizedName>
<interval>2000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Replace air/liquid seals of rotary axis joint</lang>
<lang langKey="it">Sostituire tenute aria/liquido giunto assi rotanti</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>0</counterId>
</maintenance>
<maintenancesConfig>
<contact>
<name>CMS</name>
<email>cms@cms.it</email>
<phoneNumber>034564111</phoneNumber>
</contact>
<maintenances>
<maintenance>
<id>1</id>
<localizedName>
<lang langKey="en">5-Axis operating-unit management</lang>
<lang langKey="it">Gestione gruppo operatore 5 assi</lang>
</localizedName>
<interval>2000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Replace air/liquid seals of rotary axis joint</lang>
<lang langKey="it">Sostituire tenute aria/liquido giunto assi rotanti</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>0</counterId>
</maintenance>
<maintenance>
<id>2</id>
<localizedName>
<lang langKey="en">Transmission member check</lang>
<lang langKey="it">Gestione Organi di trasmissione</lang>
</localizedName>
<interval>2000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Transmission members check</lang>
<lang langKey="it">Necessary control of all transmission system</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>2</id>
<localizedName>
<lang langKey="en">Transmission member check</lang>
<lang langKey="it">Gestione Organi di trasmissione</lang>
</localizedName>
<interval>2000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Transmission members check</lang>
<lang langKey="it">Necessary control of all transmission system</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>3</id>
<localizedName>
<lang langKey="en">Mechanical/electrical safety systems</lang>
<lang langKey="it">Sistemi di sicurezza meccanici/elettrici</lang>
</localizedName>
<interval>2000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Necessary control of mechanical/electrical safety systems</lang>
<lang langKey="it">Necessario controllo di tutti i sistemi di sicurezza meccanici/elettrici presenti in macchina</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>3</id>
<localizedName>
<lang langKey="en">Mechanical/electrical safety systems</lang>
<lang langKey="it">Sistemi di sicurezza meccanici/elettrici</lang>
</localizedName>
<interval>2000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Necessary control of mechanical/electrical safety systems</lang>
<lang langKey="it">Necessario controllo di tutti i sistemi di sicurezza meccanici/elettrici presenti in macchina</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>4</id>
<localizedName>
<lang langKey="en">Check of axis geometry</lang>
<lang langKey="it">Controllo geometria assi</lang>
</localizedName>
<interval>2000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Necessary control of axis geometry</lang>
<lang langKey="it">Necessario controllo della corretta geometria assi</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>4</id>
<localizedName>
<lang langKey="en">Check of axis geometry</lang>
<lang langKey="it">Controllo geometria assi</lang>
</localizedName>
<interval>2000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Necessary control of axis geometry</lang>
<lang langKey="it">Necessario controllo della corretta geometria assi</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>5</id>
<localizedName>
<lang langKey="en">Machine System check</lang>
<lang langKey="it">Controllo impianti macchina necessario</lang>
</localizedName>
<interval>2000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Necessary control Electric / Mechanical / Pneumatic Systems</lang>
<lang langKey="it">Necessario controllo impianti Elettrico / Meccanico / Pneumatico</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>5</id>
<localizedName>
<lang langKey="en">Machine System check</lang>
<lang langKey="it">Controllo impianti macchina necessario</lang>
</localizedName>
<interval>2000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Necessary control Electric / Mechanical / Pneumatic Systems</lang>
<lang langKey="it">Necessario controllo impianti Elettrico / Meccanico / Pneumatico</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>6</id>
<localizedName>
<lang langKey="en">Tool holder clamps management</lang>
<lang langKey="it">Gestione manine portautensili</lang>
</localizedName>
<interval>4000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Replace composite material tool holder clamps</lang>
<lang langKey="it">Sostituire manine portautensili in materiale composito</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>6</id>
<localizedName>
<lang langKey="en">Tool holder clamps management</lang>
<lang langKey="it">Gestione manine portautensili</lang>
</localizedName>
<interval>4000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Replace composite material tool holder clamps</lang>
<lang langKey="it">Sostituire manine portautensili in materiale composito</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>7</id>
<localizedName>
<lang langKey="en">Balancing cylinders management</lang>
<lang langKey="it">Gestione cilindri di bilanciamento</lang>
</localizedName>
<interval>4000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Replace seals on balancing cylinders</lang>
<lang langKey="it">Sostituire tenute su cilindri di bilanciamento</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>7</id>
<localizedName>
<lang langKey="en">Balancing cylinders management</lang>
<lang langKey="it">Gestione cilindri di bilanciamento</lang>
</localizedName>
<interval>4000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Replace seals on balancing cylinders</lang>
<lang langKey="it">Sostituire tenute su cilindri di bilanciamento</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>1</counterId>
</maintenance>
<maintenance>
<id>8</id>
<localizedName>
<lang langKey="en">Lower-grinder servicing necessary</lang>
<lang langKey="it">Revisione mola inferiore necessaria</lang>
</localizedName>
<interval>4000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Execute spindle service of Lower-grinder</lang>
<lang langKey="it">Eseguire revisione al mandrino della mola inferiore</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>2</counterId>
</maintenance>
<maintenance>
<id>8</id>
<localizedName>
<lang langKey="en">Lower-grinder servicing necessary</lang>
<lang langKey="it">Revisione mola inferiore necessaria</lang>
</localizedName>
<interval>4000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Execute spindle service of Lower-grinder</lang>
<lang langKey="it">Eseguire revisione al mandrino della mola inferiore</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>2</counterId>
</maintenance>
<maintenance>
<id>9</id>
<localizedName>
<lang langKey="en">Upper-grinder servicing necessary</lang>
<lang langKey="it">Revisione mola superiore necessaria</lang>
</localizedName>
<interval>4000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Execute spindle service of Upper-grinder</lang>
<lang langKey="it">Eseguire revisione al mandrino della mola superiore</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>3</counterId>
</maintenance>
<maintenance>
<id>9</id>
<localizedName>
<lang langKey="en">Upper-grinder servicing necessary</lang>
<lang langKey="it">Revisione mola superiore necessaria</lang>
</localizedName>
<interval>4000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Execute spindle service of Upper-grinder</lang>
<lang langKey="it">Eseguire revisione al mandrino della mola superiore</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>3</counterId>
</maintenance>
<maintenance>
<id>10</id>
<localizedName>
<lang langKey="en">Drill servicing necessary</lang>
<lang langKey="it">Revisione foratore necessario</lang>
</localizedName>
<interval>4000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Execute spindle service of the driller</lang>
<lang langKey="it">Eseguire revisione al mandrino del foratore</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>4</counterId>
</maintenance>
<maintenance>
<id>10</id>
<localizedName>
<lang langKey="en">Drill servicing necessary</lang>
<lang langKey="it">Revisione foratore necessario</lang>
</localizedName>
<interval>4000</interval>
<deadline>15/07/2018 13:00</deadline>
<type>MACHINE_INTERVAL</type>
<localizedDescription>
<lang langKey="en">Execute spindle service of the driller</lang>
<lang langKey="it">Eseguire revisione al mandrino del foratore</lang>
</localizedDescription>
<unitOfMeasure>mm</unitOfMeasure>
<counterId>4</counterId>
</maintenance>
</maintenances>
</maintenances>
</maintenancesConfig>
@@ -1,53 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="maintenances">
<xs:complexType>
<xs:sequence>
<xs:element name="maintenancesConfig">
<xs:complexType>
<xs:all>
<!-- Maintenance -->
<xs:element name="maintenance" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:all>
<xs:element name="id" type="xs:int" />
<xs:element name="localizedName">
<xs:complexType>
<xs:sequence>
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="interval" type="xs:string" />
<xs:element name="deadline" type="xs:string" />
<xs:element name="localizedDescription">
<xs:complexType>
<xs:sequence>
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="unitOfMeasure" type="unitOfMeasureType" />
<xs:element name="type" type="maintenanceType" />
<xs:element name="counterId" type="xs:unsignedInt"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="contact">
<xs:complexType>
<xs:all>
<xs:element name="email" minOccurs='1' maxOccurs='1'/>
<xs:element name="name" minOccurs='1' maxOccurs='1'/>
<xs:element name="phoneNumber" minOccurs='1' maxOccurs='1'/>
</xs:all>
</xs:complexType>
</xs:element>
<xs:element name="maintenances">
<xs:complexType>
<xs:sequence>
<!-- Unique id constraint -->
<xs:unique name="uniqueId">
<xs:selector xpath="maintenance"/>
<xs:field xpath="id" />
</xs:unique>
<!-- Maintenance -->
<xs:element name="maintenance" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:all>
<xs:element name="id" type="xs:int" />
<xs:element name="localizedName">
<xs:complexType>
<xs:sequence>
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="interval" type="xs:string" />
<xs:element name="deadline" type="xs:string" />
<xs:element name="localizedDescription">
<xs:complexType>
<xs:sequence>
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="unitOfMeasure" type="unitOfMeasureType" />
<xs:element name="type" type="maintenanceType" />
<xs:element name="counterId" type="xs:unsignedInt"/>
</xs:all>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<!-- Unique language id constraint -->
<xs:unique name="uniqueLangKey">
<xs:selector xpath="lang" />
<xs:field xpath="@langKey" />
</xs:unique>
<!-- Unique id constraint -->
<xs:unique name="uniqueId">
<xs:selector xpath="maintenance"/>
<xs:field xpath="id" />
</xs:unique>
<!-- Unique language id constraint -->
<xs:unique name="uniqueLangKey">
<xs:selector xpath="lang" />
<xs:field xpath="@langKey" />
</xs:unique>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
<!-- Language Type -->
<xs:complexType name="langType">
+1
View File
@@ -14,6 +14,7 @@ namespace Step.Config
public static SoftwareProdConfigModel SoftwareProdConfig;
public static MachineModel MachineConfig;
public static List<MaintenanceConfigModel> MaintenancesConfig;
public static ContactModel ContactConfig;
public static List<FunctionAccessModel> FunctionsAccessConfig;
public static List<DTORuntimeFunctionalityModel> AllFunctionalityDisabled;
+15 -4
View File
@@ -346,10 +346,21 @@ namespace Step.Config
// Get Maintenances file handler
XDocument xmlConfigFile = GetXmlHandlerWithValidator(MAINTENANCES_CONFIG_SCHEMA_PATH, MAINTENANCES_CONFIG_PATH);
MaintenancesConfig = xmlConfigFile
.Root
.Elements()
.ToList()
ContactConfig = xmlConfigFile
.Descendants("contact")
.Select(x =>
new ContactModel()
{
Name = x.Element("name").Value,
Email = x.Element("email").Value,
PhoneNumber = x.Element("phoneNumber").Value
})
.FirstOrDefault();
MaintenancesConfig = xmlConfigFile
.Descendants("maintenances")
.Elements("maintenance")
.Select(x =>
new MaintenanceConfigModel()
{
@@ -6,7 +6,7 @@ namespace Step.Model.ConfigModels
public class MaintenanceConfigModel
{
public int Id { get; set; }
public Dictionary<string, string> LocalizedName { get; set; }
public Dictionary<string, string> LocalizedName { get; set; }
public TimeSpan Intervall { get; set; }
public DateTime Deadline { get; set; }
public string Type { get; set; }
@@ -15,4 +15,11 @@ namespace Step.Model.ConfigModels
public Dictionary<string, string> LocalizedDescription { get; set; }
public string UnitOfMeasure { get; set; }
}
public class ContactModel
{
public string Name { get; set; }
public string Email { get; set; }
public string PhoneNumber { get; set; }
}
}
+1 -1
View File
@@ -113,7 +113,7 @@ namespace Step.NC
DTONewNcFamilyModel newFamily = new DTONewNcFamilyModel();
SupportFunctions.CopyProperties(dtoToolWithFamily, newFamily);
// Update only family data
newFamily = (DTONcFamilyModel)toolsManager.UpdateFamily(dtoToolWithFamily.FamilyId, newFamily);
newFamily = (DTONcFamilyModel)toolsManager.UpdateFamily(dtoToolWithFamily.FamilyId, newFamily);
}
// Update database tool Tool
+5 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Automatically generated by lucio.maranta: 2019-06-04 -->
<!-- Automatically generated by lucio.maranta: 2019-06-05 -->
<root>
<language_it>Italiano</language_it>
<header_maintainance_request>Effettuare manutenzione</header_maintainance_request>
@@ -54,6 +54,10 @@
<machineinfo_core_scm_version>Versione Core Maestro-Active:</machineinfo_core_scm_version>
<machineinfo_scm_client_version>Versione Client Maestro-Active:</machineinfo_scm_client_version>
<machineinfo_scm_dateformat>Formato delle date Maestro-Active:</machineinfo_scm_dateformat>
<contactinfo_lbl_title>Informazioni di contatto</contactinfo_lbl_title>
<contact_name>Nome contatto:</contact_name>
<contact_email>Email:</contact_email>
<contact_phoneNumber>Telefono:</contact_phoneNumber>
<head_label_rpm>Rpm</head_label_rpm>
<head_label_tool>Utensile</head_label_tool>
<head_label_load>Carico</head_label_load>
+5 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Automatically generated by lucio.maranta: 2019-06-04 -->
<!-- Automatically generated by lucio.maranta: 2019-06-05 -->
<root>
<language_it>English</language_it>
<header_maintainance_request>Maintenance request</header_maintainance_request>
@@ -54,6 +54,10 @@
<machineinfo_core_scm_version>Maestro-Active Core Version:</machineinfo_core_scm_version>
<machineinfo_scm_client_version>Maestro-Active Client Version:</machineinfo_scm_client_version>
<machineinfo_scm_dateformat>Maestro-Active Data Format:</machineinfo_scm_dateformat>
<contactinfo_lbl_title>Contact Info</contactinfo_lbl_title>
<contact_name>Contact Name:</contact_name>
<contact_email>Email:</contact_email>
<contact_phoneNumber>Phone Number:</contact_phoneNumber>
<head_label_rpm>Rpm</head_label_rpm>
<head_label_tool>Tool</head_label_tool>
<head_label_load>Load</head_label_load>
+5 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Automatically generated by lucio.maranta: 2019-06-04 -->
<!-- Automatically generated by lucio.maranta: 2019-06-05 -->
<root>
<language_it>Français</language_it>
<header_maintainance_request>Procéder à la maintenance</header_maintainance_request>
@@ -54,6 +54,10 @@
<machineinfo_core_scm_version>Version Core Maestro-Active :</machineinfo_core_scm_version>
<machineinfo_scm_client_version>Version Client Maestro-Active :</machineinfo_scm_client_version>
<machineinfo_scm_dateformat>Format des dates Maestro-Active :</machineinfo_scm_dateformat>
<contactinfo_lbl_title>Informations de contact</contactinfo_lbl_title>
<contact_name>Nom du contact</contact_name>
<contact_email>Email:</contact_email>
<contact_phoneNumber>Numéro de Téléphone:</contact_phoneNumber>
<head_label_rpm>Tpm</head_label_rpm>
<head_label_tool>Outil</head_label_tool>
<head_label_load>Charge</head_label_load>
@@ -5,8 +5,8 @@ using Step.NC;
using Step.Provider;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.IO;
using System.Linq;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
@@ -106,7 +106,7 @@ namespace Step.Controllers.WebApi
{
var configuredAlarm = InitialAlarmsConfig.Where(x => x.PlcId == i).FirstOrDefault();
if (configuredAlarm == null)
if (configuredAlarm == null)
restoreIsEnabled = false;
else
restoreIsEnabled = configuredAlarm.RestoreIsActive;
@@ -134,5 +134,11 @@ namespace Step.Controllers.WebApi
return Ok(toolTableConfiguration);
}
}
[Route("contact"), HttpGet]
public IHttpActionResult GetContact()
{
return Ok(ContactConfig);
}
}
}
+3 -2
View File
@@ -41,7 +41,7 @@
@background-color: rgb(216, 216, 216);
@handle-width: 48px;
@handle-height: 32px;
@persona-size: 88px;
@persona-size: 80px;
@spinner-loading-height: 200px;
@spinner-loading-width: 200px;
a, a:visited, a:hover, a:active {
@@ -51,8 +51,9 @@ a, a:visited, a:hover, a:active {
.persona {
height: @persona-size;
width: @persona-size;
line-height: @persona-size;
border-radius: @persona-size;
font-size: @persona-size;
font-size: 50px;
text-align: center;
background-color: @color-darkish-blue;
color: white;
@@ -33,6 +33,7 @@
@modal-iframe-height: 800px;
@modal-iframe-width: 1800px;
@modal-user-info-height: 610px;
@modal-concact-info-height: 375px;
@modal-login-top: @modal-login-height / 2;
@modal-login-left: @modal-login-width / 2;
@modal-create-maintenance-width: 896px;
@@ -344,6 +345,52 @@
}
}
.@{modal}.contact-info {
width: @modal-login-width;
height: @modal-concact-info-height;
top: calc(~"50%" - @modal-concact-info-height / 2);
left: calc(~"50%" - @modal-login-width / 2);
header {
background-color: @color-darkish-blue;
color: @color-white;
font-family: @font-family;
font-weight: 600;
font-size: 24px;
text-align: left;
padding: 0px 23px;
}
img {
display: block;
width: 88px;
height: 88px;
margin: auto;
margin-top: 48px;
margin-bottom: 40px;
}
.details {
text-align: center;
color: @color-greyish-brown;
& > * {
display: block;
margin-bottom: 5px;
height: 20px;
line-height: 20px;
}
& > label {
text-align: right;
strong {
display: inline-block;
width: 50%;
text-align: left;
}
}
& > hr {
border: none;
}
}
}
.@{modal}.self-adaptive {
width: @modal-selfadaptivepath-width;
height: @modal-selfadaptivepath-height;
+49 -4
View File
@@ -280,6 +280,50 @@
.modal.machine-info .details > hr {
border: none;
}
.modal.contact-info {
width: 600px;
height: 375px;
top: calc(50% - 187.5px);
left: calc(50% - 300px);
}
.modal.contact-info header {
background-color: #002680;
color: #fff;
font-family: 'Work Sans', sans-serif;
font-weight: 600;
font-size: 24px;
text-align: left;
padding: 0px 23px;
}
.modal.contact-info img {
display: block;
width: 88px;
height: 88px;
margin: auto;
margin-top: 48px;
margin-bottom: 40px;
}
.modal.contact-info .details {
text-align: center;
color: #4b4b4b;
}
.modal.contact-info .details > * {
display: block;
margin-bottom: 5px;
height: 20px;
line-height: 20px;
}
.modal.contact-info .details > label {
text-align: right;
}
.modal.contact-info .details > label strong {
display: inline-block;
width: 50%;
text-align: left;
}
.modal.contact-info .details > hr {
border: none;
}
.modal.self-adaptive {
width: 750px;
height: 350px;
@@ -20497,10 +20541,11 @@ a:active {
text-decoration: none;
}
.persona {
height: 88px;
width: 88px;
border-radius: 88px;
font-size: 88px;
height: 80px;
width: 80px;
line-height: 80px;
border-radius: 80px;
font-size: 50px;
text-align: center;
background-color: #002680;
color: white;
+2 -1
View File
@@ -5,7 +5,7 @@ import { LoginService } from "src/services/loginService";
import { store, AppModel, MachineStatusModel, machineStatusActions, localizationModelActions, machineInfoActions } from "src/store";
import { UserInfoDialog, MachineInfoDialog, AxesCalibration, Login } from "src/app_modules/machine";
import { UserInfoDialog, MachineInfoDialog, AxesCalibration, ContactInfoDialog, Login } from "src/app_modules/machine";
import { AreaModel } from "src/store/machineStatus.store";
@@ -43,6 +43,7 @@ const messageService = Factory.Get(MessageService);
messageService.subscribeToChannel("show-user-info", () => { ModalHelper.ShowModal(UserInfoDialog); });
messageService.subscribeToChannel("show-machine-info", () => { ModalHelper.ShowModal(MachineInfoDialog); });
messageService.subscribeToChannel("show-contact-info", () => { ModalHelper.ShowModal(ContactInfoDialog); });
messageService.subscribeToChannel("show-axes-calibration", () => { ModalHelper.ShowNcModal(AxesCalibration); });
messageService.subscribeToChannel("hide-axes-calibration", () => { ModalHelper.HideNcModal(AxesCalibration); });
messageService.subscribeToChannel("show-m155-questions", () => { ModalHelper.ShowNextM155Modal(); });
@@ -0,0 +1,31 @@
import Vue from "vue";
import { Modal, ModalHelper } from "src/components/modals";
import { machineService, ContactConfigurationModel } from "src/services/machineService";
import { Factory, MessageService, awaiter } from "src/_base";
import Component from "vue-class-component";
@Component({ components: { modal: Modal } })
export default class ContactInfoDialog extends Vue {
public contactInfo: ContactConfigurationModel = {
name:"",
phoneNumber: "",
email: ""
};
async beforeMount() {
this.contactInfo = await awaiter(new machineService().getContactConfiguration());
Factory.Get(MessageService).subscribeToChannel("esc_pressed", args => {
this.close();
});
}
beforeDestroy() {
Factory.Get(MessageService).deleteChannel("esc_pressed");
}
close() {
Factory.Get(MessageService).deleteChannel("esc_pressed");
ModalHelper.HideModal();
}
}
@@ -0,0 +1,18 @@
<template>
<modal type="contact-info" :title="'contactinfo_lbl_title' | localize('Informazioni di contatto')">
<button class="close" slot="header-buttons" @click="close()"><i class="fa fa-remove"></i></button>
<div>
<i class="fa fa-phone persona block"></i>
<div class="details">
<label>{{'contact_name' | localize('Nome contatto:')}} <strong>{{contactInfo.name}}</strong></label>
<label>{{'contact_email' | localize('Email:')}} <strong>{{contactInfo.email}}</strong></label>
<label>{{'contact_phoneNumber' | localize('Telefono:')}} <strong>{{contactInfo.phoneNumber}}</strong></label>
</div>
</div>
</modal>
</template>
<script src="./contact-info-dialog.ts" lang="ts">
</script>
@@ -5,6 +5,10 @@
<i class="fa fa-question"></i>
</button>
-->
<button class="dark-blue"
@click="sendMessage('show-contact-info')" :title="'header_tooltip_btn_mchinfo' | localize('Show Machine Info')">
<i class="fa fa-phone"></i>
</button>
<button class="dark-blue"
@click="sendMessage('show-machine-info')" :title="'header_tooltip_btn_mchinfo' | localize('Show Machine Info')">
<img src="assets/icons/png/machine-info.png" width="28px">
@@ -2,6 +2,7 @@ import Login from "./components/login.vue";
import AxesCalibration from "./components/axes-calibration-dialog.vue";
import M155Questions from "./components/m155-dialog.vue";
import MachineInfoDialog from "./components/machine-info-dialog.vue";
import ContactInfoDialog from "./components/contact-info-dialog.vue";
import UserInfoDialog from "./components/user-info-dialog.vue";
import UserInfo from "./components/user-info.vue";
@@ -10,6 +11,7 @@ export {
AxesCalibration,
M155Questions,
MachineInfoDialog,
ContactInfoDialog,
UserInfoDialog,
UserInfo
}
@@ -10,6 +10,10 @@ export class machineService extends baseRestService {
return await this.Get<AreaModel[]>("/api/configuration/areas");
}
async getContactConfiguration(): Promise<ContactConfigurationModel> {
return await this.Get<ContactConfigurationModel>("/api/configuration/contact")
}
async getMachineConfiguration(): Promise<ClientConfigurationModel> {
return await this.Get<ClientConfigurationModel>("/api/configuration/client")
}
@@ -54,6 +58,12 @@ export interface ClientConfigurationModel {
defaultLanguage: string
}
export interface ContactConfigurationModel {
name: string,
email: string,
phoneNumber: string
}
export interface NCInfoModel {
language: string,
serialNumber: string,