Professional Documents
Culture Documents
sign by
ERROR: C:/Users/c.dargent/Sources/Front/gambit-admin-
tool/src/app/modules/operations/components/operation-done/operation-
done.component.ts[99, 11]: Expected property shorthand in object literal ('{operat
import { OperationComponent } from
"../../../../shared/components/operation-edit-transfer/operation-edit-
transfer.component";
[error-message]="setErrorMessageAmount(this.transferForm.controls.amount)"
setErrorMessageAmount(element) {
const inputAmount = this.modal.nativeElement.querySelector("#formAmount");
if (element.hasError("required")) {
inputAmount.setAttribute(this.errorMessage,
this.translate.get("OPERATION_FORM_FIELD_REQUIRED")["value"]);
} else {
if (element.hasError("pattern")) {
inputAmount.setAttribute(this.errorMessage,
this.translate.get("OPERATION_FORM_INCORRECT_AMOUNT")["value"]);
}
}
}
setErrorMessageCommunication(element) {
const inputControl = this.modal.nativeElement.querySelector("#formControl");
if (element.hasError("required")) {
inputControl.setAttribute(this.errorMessage,
this.translate.get("OPERATION_FORM_FIELD_REQUIRED")["value"]);
}
}
setErrorMessageIBAN(element) {
const inputIban = this.modal.nativeElement.querySelector("#formIBAN");
if (element.hasError("required")) {
inputIban.setAttribute(this.errorMessage,
this.translate.get("OPERATION_FORM_FIELD_REQUIRED")["value"]);
} else {
if (element.hasError("lengthError")) {
inputIban.setAttribute(this.errorMessage,
this.translate.get("OPERATION_FORM_IBAN_WRONG_SIZE")["value"]);
}
if (element.hasError("invalidIban")) {
inputIban.setAttribute(this.errorMessage,
this.translate.get("OPERATION_FORM_INVALID_IBAN")["value"]);
}
}
}
setErrorMessageBic(element) {
const inputBIC = this.modal.nativeElement.querySelector("#formBIC");
if (element.hasError("required")) {
inputBIC.setAttribute(this.errorMessage,
this.translate.get("OPERATION_FORM_FIELD_REQUIRED")["value"]);
} else {
if (element.hasError("pattern")) {
inputBIC.setAttribute(this.errorMessage,
this.translate.get("OPERATION_FORM_INCORRECT_BIC")["value"]);
}
}
}
setErrorMessageName(element) {
const inputName = this.modal.nativeElement.querySelector("#formName");
if (element.hasError("required")) {
inputName.setAttribute(this.errorMessage,
this.translate.get("OPERATION_FORM_FIELD_REQUIRED")["value"]);
}
}
saveChange() {
this.transferData.transferInformationModel.amount =
this.transferForm.get("amount").value;
this.transferData.transferInformationModel.destinationIban =
this.transferForm.get("iban").value;
this.transferData.transferInformationModel.destinationBic =
this.transferForm.get("bic").value;
this.transferData.transferInformationModel.destinationName =
this.transferForm.get("name").value;
this.transferData.transferInformationModel.communication =
this.transferForm.get("communication").value;
this.isEdition = false;
}