First commit of NewContact
This commit is contained in:
@@ -3,8 +3,24 @@
|
||||
<contact>
|
||||
<name>CMS</name>
|
||||
<email>cms@cms.it</email>
|
||||
<phoneNumber>034564111</phoneNumber>
|
||||
<phoneNumber></phoneNumber>
|
||||
</contact>
|
||||
<backOfficeContact>
|
||||
<name>backOffice</name>
|
||||
<email>cms@cms.it</email>
|
||||
<phoneNumber>333333333</phoneNumber>
|
||||
</backOfficeContact>
|
||||
<sparePartsContact>
|
||||
<name>Spare part</name>
|
||||
<email>cms@cms.it</email>
|
||||
<phoneNumber>333333333</phoneNumber>
|
||||
</sparePartsContact>
|
||||
<retrofitContact>
|
||||
<name>retrofit</name>
|
||||
<email>cms@cms.it</email>
|
||||
<phoneNumber>333333333</phoneNumber>
|
||||
</retrofitContact>
|
||||
<webSite>www.google.it</webSite>
|
||||
<maintenances>
|
||||
<maintenance>
|
||||
<id>1</id>
|
||||
@@ -22,159 +38,5 @@
|
||||
<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>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>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>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>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>
|
||||
|
||||
</maintenances>
|
||||
</maintenancesConfig>
|
||||
@@ -3,16 +3,11 @@
|
||||
<xs:element name="maintenancesConfig">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
|
||||
<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="contact" type="contactType"></xs:element>
|
||||
<xs:element name="backOfficeContact" type="contactType"></xs:element>
|
||||
<xs:element name="sparePartsContact" type="contactType"></xs:element>
|
||||
<xs:element name="retrofitContact" type="contactType"></xs:element>
|
||||
<xs:element name="webSite" type="xs:string"></xs:element>
|
||||
<xs:element name="maintenances">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@@ -76,6 +71,16 @@
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- Contact Type -->
|
||||
<xs:complexType name="contactType">
|
||||
<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>
|
||||
|
||||
|
||||
<!-- Maintenance Type -->
|
||||
<xs:simpleType name="maintenanceType" final="restriction">
|
||||
<xs:restriction base="xs:string">
|
||||
|
||||
@@ -15,6 +15,9 @@ namespace Step.Config
|
||||
public static MachineModel MachineConfig;
|
||||
public static List<MaintenanceConfigModel> MaintenancesConfig;
|
||||
public static ContactModel ContactConfig;
|
||||
public static ContactModel SparePartConfig;
|
||||
public static ContactModel BackOfficeConfig;
|
||||
public static ContactModel RetrofitConfig;
|
||||
|
||||
public static List<FunctionAccessModel> FunctionsAccessConfig;
|
||||
public static List<DTORuntimeFunctionalityModel> AllFunctionalityDisabled;
|
||||
|
||||
@@ -12,7 +12,7 @@ using System.Xml.Linq;
|
||||
using System.Xml.Schema;
|
||||
using System.Xml.Serialization;
|
||||
using static Step.Config.ServerConfig;
|
||||
using static Step.Model.Constants;
|
||||
using static Step.Model.Constants;
|
||||
using static Step.Utils.SupportFunctions;
|
||||
|
||||
namespace Step.Config
|
||||
@@ -356,7 +356,40 @@ 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();
|
||||
|
||||
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" }
|
||||
.ToArray();
|
||||
|
||||
@@ -142,7 +142,12 @@ namespace Step.Controllers.WebApi
|
||||
[Route("contact"), HttpGet]
|
||||
public IHttpActionResult GetContact()
|
||||
{
|
||||
return Ok(ContactConfig);
|
||||
return Ok(new {
|
||||
ContactConfig,
|
||||
SparePartConfig,
|
||||
RetrofitConfig,
|
||||
BackOfficeConfig
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -594,10 +594,10 @@
|
||||
}
|
||||
|
||||
.@{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);
|
||||
width: @modal-machine-width;
|
||||
height: @modal-machine-height;
|
||||
top: calc(~"50%" - @modal-machine-height / 2);
|
||||
left: calc(~"50%" - @modal-machine-width / 2);
|
||||
header {
|
||||
background-color: @color-darkish-blue;
|
||||
color: @color-white;
|
||||
@@ -618,6 +618,7 @@
|
||||
.details {
|
||||
text-align: center;
|
||||
color: @color-greyish-brown;
|
||||
margin-bottom: 30px;
|
||||
& > * {
|
||||
display: block;
|
||||
margin-bottom: 5px;
|
||||
@@ -637,6 +638,16 @@
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
.contactInfo {
|
||||
margin-bottom: 75px;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
height: 30px;
|
||||
font-size: 17px;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.@{modal}.self-adaptive {
|
||||
|
||||
@@ -516,8 +516,8 @@
|
||||
}
|
||||
.modal.contact-info {
|
||||
width: 600px;
|
||||
height: 375px;
|
||||
top: calc(50% - 187.5px);
|
||||
height: 730px;
|
||||
top: calc(50% - 365px);
|
||||
left: calc(50% - 300px);
|
||||
}
|
||||
.modal.contact-info header {
|
||||
@@ -540,6 +540,7 @@
|
||||
.modal.contact-info .details {
|
||||
text-align: center;
|
||||
color: #4b4b4b;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.modal.contact-info .details > * {
|
||||
display: block;
|
||||
@@ -558,6 +559,15 @@
|
||||
.modal.contact-info .details > hr {
|
||||
border: none;
|
||||
}
|
||||
.modal.contact-info .contactInfo {
|
||||
margin-bottom: 75px;
|
||||
}
|
||||
.modal.contact-info .btn-success {
|
||||
height: 30px;
|
||||
font-size: 17px;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
}
|
||||
.modal.self-adaptive {
|
||||
width: 750px;
|
||||
height: 350px;
|
||||
|
||||
@@ -1,19 +1,43 @@
|
||||
import Vue from "vue";
|
||||
import { Modal, ModalHelper } from "src/components/modals";
|
||||
import { machineService, ContactConfigurationModel } from "src/services/machineService";
|
||||
import { machineService, ContactConfigurationModel, ContactModel } 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 = {
|
||||
public contactInfo: ContactModel = {
|
||||
name:"",
|
||||
phoneNumber: "",
|
||||
email: ""
|
||||
};
|
||||
|
||||
public retrofitConfig: ContactModel = {
|
||||
name:"",
|
||||
phoneNumber: "",
|
||||
email: ""
|
||||
};
|
||||
|
||||
public sparePartConfig: ContactModel = {
|
||||
name:"",
|
||||
phoneNumber: "",
|
||||
email: ""
|
||||
};
|
||||
|
||||
public backOfficeConfig: ContactModel = {
|
||||
name:"",
|
||||
phoneNumber: "",
|
||||
email: ""
|
||||
};
|
||||
|
||||
|
||||
|
||||
async beforeMount() {
|
||||
this.contactInfo = await awaiter(new machineService().getContactConfiguration());
|
||||
var contact = await awaiter(new machineService().getContactConfiguration());
|
||||
this.contactInfo = contact.contactConfig
|
||||
this.retrofitConfig = contact.retrofitConfig
|
||||
this.sparePartConfig = contact.sparePartConfig
|
||||
this.backOfficeConfig = contact.backOfficeConfig
|
||||
messageService.subscribeToChannel("esc_pressed", args => {
|
||||
this.close();
|
||||
});
|
||||
|
||||
@@ -2,13 +2,29 @@
|
||||
<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">
|
||||
<div class="details contactInfo">
|
||||
<h3>{{'assistance_name' | localize('Informazioni assistenza:').toUpperCase()}}</h3>
|
||||
<label v-if="contactInfo.name">{{'contact_name' | localize('Nome contatto:')}} <strong>{{contactInfo.name}}</strong></label>
|
||||
<label v-if="contactInfo.email">{{'contact_email' | localize('Email:')}} <strong>{{contactInfo.email}}</strong></label>
|
||||
<label v-if="contactInfo.phoneNumber">{{'contact_phoneNumber' | localize('Telefono:')}} <strong>{{contactInfo.phoneNumber}}</strong></label>
|
||||
</div>
|
||||
<div class="details">
|
||||
<h3 v-if="backOfficeConfig.name">{{backOfficeConfig.name.toUpperCase()}}</h3>
|
||||
<label v-if="backOfficeConfig.email">{{'contact_email' | localize('Email:')}} <strong>{{backOfficeConfig.email}}</strong></label>
|
||||
<label v-if="backOfficeConfig.phoneNumber">{{'contact_phoneNumber' | localize('Telefono:')}} <strong>{{backOfficeConfig.phoneNumber}}</strong></label>
|
||||
</div>
|
||||
<div class="details">
|
||||
<h3 v-if="sparePartConfig.name">{{sparePartConfig.name.toUpperCase()}}</h3>
|
||||
<label v-if="sparePartConfig.email">{{'contact_email' | localize('Email:')}} <strong>{{sparePartConfig.email}}</strong></label>
|
||||
<label v-if="sparePartConfig.phoneNumber">{{'contact_phoneNumber' | localize('Telefono:')}} <strong>{{sparePartConfig.phoneNumber}}</strong></label>
|
||||
</div>
|
||||
<div class="details">
|
||||
<h3 v-if="retrofitConfig.name">{{retrofitConfig.name.toUpperCase()}}</h3>
|
||||
<label v-if="retrofitConfig.email">{{'contact_email' | localize('Email:')}} <strong>{{retrofitConfig.email}}</strong></label>
|
||||
<label v-if="retrofitConfig.phoneNumber">{{'contact_phoneNumber' | localize('Telefono:')}} <strong>{{retrofitConfig.phoneNumber}}</strong></label>
|
||||
</div>
|
||||
<button class="btn btn-success">{{'customer_care_info' | localize('Customer Care Info')}}</button>
|
||||
</div>
|
||||
</modal>
|
||||
</template>
|
||||
|
||||
@@ -20,7 +20,6 @@ export class machineService extends baseRestService {
|
||||
|
||||
async getMachineCNInfo(): Promise<NCInfoModel> {
|
||||
let result = await this.Get<NCInfoModel>("/api/nc/generic_data", true).catch(r => {
|
||||
console.debug(r);
|
||||
});
|
||||
|
||||
if (result) {
|
||||
@@ -57,6 +56,13 @@ export interface ClientConfigurationModel {
|
||||
}
|
||||
|
||||
export interface ContactConfigurationModel {
|
||||
contactConfig: ContactModel,
|
||||
backOfficeConfig: ContactModel,
|
||||
retrofitConfig: ContactModel,
|
||||
sparePartConfig: ContactModel
|
||||
}
|
||||
|
||||
export interface ContactModel{
|
||||
name: string,
|
||||
email: string,
|
||||
phoneNumber: string
|
||||
|
||||
Reference in New Issue
Block a user