case 3976

This commit is contained in:
2021-09-24 23:42:59 +00:00
parent 542926b748
commit ed78e94af9
19 changed files with 38 additions and 29 deletions

View File

@@ -142,7 +142,7 @@ namespace AyaNova.Api.Controllers
return StatusCode(403, new ApiNotAuthorizedResponse());
if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState));
return Ok(ApiOkResponse.Response(await ct.Customer.AsNoTracking().Where(x => x.Id == id).Select(x => x.PopUpNotes).FirstOrDefaultAsync()));
return Ok(ApiOkResponse.Response(await ct.Customer.AsNoTracking().Where(x => x.Id == id).Select(x => x.AlertNotes).FirstOrDefaultAsync()));
}
/// <summary>

View File

@@ -165,7 +165,7 @@ namespace AyaNova.Api.Controllers
return StatusCode(403, new ApiNotAuthorizedResponse());
if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState));
return Ok(ApiOkResponse.Response(await ct.Vendor.AsNoTracking().Where(x => x.Id == id).Select(x => x.PopUpNotes).FirstOrDefaultAsync()));
return Ok(ApiOkResponse.Response(await ct.Vendor.AsNoTracking().Where(x => x.Id == id).Select(x => x.AlertNotes).FirstOrDefaultAsync()));
}

View File

@@ -63,10 +63,10 @@ namespace AyaNova.DataList
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "CustomerPopUpNotes",
FieldKey = "customerpopupnotes",
TKey = "CustomerAlertNotes",
FieldKey = "CustomerAlertNotes",
UiFieldDataType = (int)UiFieldDataType.Text,
SqlValueColumnName = "acustomer.popupnotes"
SqlValueColumnName = "acustomer.alertnotes"
});
FieldDefinitions.Add(new DataListFieldDefinition

View File

@@ -57,6 +57,14 @@ namespace AyaNova.DataList
SqlValueColumnName = "avendor.webaddress"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "VendorAlertNotes",
FieldKey = "VendorAlertNotes",
UiFieldDataType = (int)UiFieldDataType.Text,
SqlValueColumnName = "avendor.alertnotes"
});
FieldDefinitions.Add(new DataListFieldDefinition
{
TKey = "VendorAccountNumber",

View File

@@ -222,7 +222,7 @@ namespace AyaNova.Biz
.AddText(obj.Wiki)
.AddText(obj.Tags)
.AddText(obj.WebAddress)
.AddText(obj.PopUpNotes)
.AddText(obj.AlertNotes)
.AddText(obj.TechNotes)
.AddText(obj.AccountNumber)
.AddText(obj.Phone1)

View File

@@ -139,7 +139,7 @@ namespace AyaNova.Biz
//l.Add(new FormField { TKey = "UsesBanking", FieldKey = "UsesBanking" });
l.Add(new FormField { TKey = "CustomerNotes", FieldKey = "Notes" });
l.Add(new FormField { TKey = "CustomerTechNotes", FieldKey = "TechNotes" });
l.Add(new FormField { TKey = "AlertNotes", FieldKey = "PopUpNotes" });
l.Add(new FormField { TKey = "AlertNotes", FieldKey = "AlertNotes" });
l.Add(new FormField { TKey = "Tags", FieldKey = "Tags" });
l.Add(new FormField { TKey = "Wiki", FieldKey = "Wiki" });
l.Add(new FormField { TKey = "Attachments", FieldKey = "Attachments" });
@@ -779,7 +779,7 @@ namespace AyaNova.Biz
l.Add(new FormField { TKey = "VendorContact", FieldKey = "Contact" });
l.Add(new FormField { TKey = "VendorNotes", FieldKey = "Notes" });
l.Add(new FormField { TKey = "VendorContactNotes", FieldKey = "ContactNotes" });
l.Add(new FormField { TKey = "AlertNotes", FieldKey = "PopUpNotes" });
l.Add(new FormField { TKey = "AlertNotes", FieldKey = "AlertNotes" });
l.Add(new FormField { TKey = "Tags", FieldKey = "Tags" });
l.Add(new FormField { TKey = "Wiki", FieldKey = "Wiki" });
l.Add(new FormField { TKey = "Attachments", FieldKey = "Attachments" });

View File

@@ -859,9 +859,9 @@ namespace AyaNova.Biz
await ItemPopulateVizFields(v, populateForReporting);
}
//popup Alert notes
//Alert notes
//Customer notes first then others below
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.PopUpNotes, x.TechNotes, CustomerViz = x.Name }).FirstOrDefaultAsync();
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.AlertNotes, x.TechNotes, CustomerViz = x.Name }).FirstOrDefaultAsync();
if (!string.IsNullOrWhiteSpace(custInfo.AlertViz))
{
o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertViz}\n\n";

View File

@@ -142,6 +142,7 @@ namespace AyaNova.Biz
var vnd = await ct.Vendor.AsNoTracking().Where(x => x.Id == po.VendorId).FirstOrDefaultAsync();
po.VendorViz = vnd.Name;
po.VendorAlertNotesViz = vnd.AlertNotes;
if (forReporting)
{
po.VendorAddressViz = vnd.Address;
@@ -164,7 +165,7 @@ namespace AyaNova.Biz
po.VendorContactViz = vnd.Contact;
po.VendorContactNotesViz = vnd.ContactNotes;
po.VendorPopUpNotesViz = vnd.PopUpNotes;
po.VendorAccountNumberViz = vnd.AccountNumber;
}

View File

@@ -838,9 +838,9 @@ namespace AyaNova.Biz
await ItemPopulateVizFields(v, populateForReporting);
}
//popup Alert notes
//Alert notes
//Customer notes first then others below
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.PopUpNotes, x.TechNotes, CustomerViz = x.Name }).FirstOrDefaultAsync();
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.AlertNotes, x.TechNotes, CustomerViz = x.Name }).FirstOrDefaultAsync();
if (!string.IsNullOrWhiteSpace(custInfo.AlertViz))
{
o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertViz}\n\n";

View File

@@ -206,7 +206,7 @@ namespace AyaNova.Biz
.AddText(obj.WebAddress)
.AddText(obj.Contact)
.AddText(obj.ContactNotes)
.AddText(obj.PopUpNotes)
.AddText(obj.AlertNotes)
.AddText(obj.AccountNumber)
.AddText(obj.Phone1)
.AddText(obj.Phone2)

View File

@@ -953,9 +953,9 @@ namespace AyaNova.Biz
await ItemPopulateVizFields(v, populateForReporting);
}
//popup Alert notes
//Alert notes
//Customer notes first then others below
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.PopUpNotes, x.TechNotes, CustomerViz = x.Name }).FirstOrDefaultAsync();
var custInfo = await ct.Customer.AsNoTracking().Where(x => x.Id == o.CustomerId).Select(x => new { AlertViz = x.AlertNotes, x.TechNotes, CustomerViz = x.Name }).FirstOrDefaultAsync();
if (!string.IsNullOrWhiteSpace(custInfo.AlertViz))
{
o.AlertViz = $"{await Translate("Customer")} - {await Translate("AlertNotes")}\n{custInfo.AlertViz}\n\n";

View File

@@ -27,7 +27,7 @@ namespace AyaNova.Models
//cant use these due to import v7 malformed shit adn can't be arsed to deal with that
//[Url]
public string WebAddress { get; set; }
public string PopUpNotes { get; set; }
public string AlertNotes { get; set; }
public bool BillHeadOffice { get; set; }
public long? HeadOfficeId { get; set; }
[NotMapped]

View File

@@ -127,7 +127,7 @@ namespace AyaNova.Models
public string VendorEmailAddressViz { get; set; }
[NotMapped]
public string VendorPopUpNotesViz { get; set; }
public string VendorAlertNotesViz { get; set; }
[NotMapped]
public string VendorAccountNumberViz { get; set; }

View File

@@ -25,7 +25,7 @@ namespace AyaNova.Models
public string Contact { get; set; }
public string ContactNotes { get; set; }
public string PopUpNotes { get; set; }
public string AlertNotes { get; set; }
public string WebAddress { get; set; }
public string AccountNumber { get; set; }
public string Phone1 { get; set; }

View File

@@ -65,7 +65,7 @@
"CustomerPhone3": "Home",
"CustomerPhone4": "Mobile",
"CustomerPhone5": "Pager",
"CustomerPopUpNotes": "Popup-Notizen",
"CustomerAlertNotes": "Warnhinweise",
"CustomerTechNotes": "Planbare Benutzer - Anmerkungen",
"CustomerGroupDescription": "Beschreibung",
"CustomerGroupList": "Kundengruppen",
@@ -2094,7 +2094,7 @@
"PasswordResetMessageBody": "Hallo {user_name},\n\nIhr Online-Konto für den Dienst steht Ihnen nach dem Festlegen Ihres Kennworts zur Verfügung.\nSie können den Kennwort für die nächsten 48 Stunden über den folgenden Link festlegen.\n\nStellen Sie Ihr Kennwort ein: {action_link}\n\nWenn Sie kein Zurücksetzen des Kontos oder Kennworts angefordert haben, ignorieren Sie diese E-Mail.\n\nDanke,\n{registered_to}",
"SendPasswordResetCode": "E-Mail zum Zurücksetzen des Passworts senden",
"CopyToClipboard": "In die Zwischenablage kopieren",
"VendorPopUpNotes": "Popup-Notizen",
"VendorAlertNotes": "Warnhinweise",
"EraseMultipleObjectsWarning": "Warnung: Sie sind dabei, mehrere Objekte dauerhaft zu löschen.\nBist du sicher?",
"Errors": "Fehler",
"BatchDeleteJob": "Batch-Löschauftrag",

View File

@@ -65,7 +65,7 @@
"CustomerPhone3": "Home",
"CustomerPhone4": "Mobile",
"CustomerPhone5": "Pager",
"CustomerPopUpNotes": "Alert notes",
"CustomerAlertNotes": "Alert notes",
"CustomerTechNotes": "Scheduleable User Notes",
"CustomerGroupDescription": "Description",
"CustomerGroupList": "Customer Groups",
@@ -2094,7 +2094,7 @@
"PasswordResetMessageBody": "Hello {user_name},\n\nYour online account for service is available to you after you set your password.\nYou can use the following link for the next 48 hours to set your password.\n\nSet your password: {action_link}\n\nIf you did not request an account or password reset, please ignore this email.\n\nThanks,\n{registered_to}",
"SendPasswordResetCode": "Send password reset email",
"CopyToClipboard": "Copy to clipboard",
"VendorPopUpNotes": "Alert notes",
"VendorAlertNotes": "Alert notes",
"EraseMultipleObjectsWarning": "Warning: you are about to permanently erase multiple objects.\r\nAre you sure?",
"Errors": "Errors",
"BatchDeleteJob": "Batch delete job",

View File

@@ -65,7 +65,7 @@
"CustomerPhone3": "Home",
"CustomerPhone4": "Mobile",
"CustomerPhone5": "Pager",
"CustomerPopUpNotes": "Notas emergentes",
"CustomerAlertNotes": "Notas emergentes",
"CustomerTechNotes": "Notas usuario programable",
"CustomerGroupDescription": "Descripción",
"CustomerGroupList": "Grupos de clientes",
@@ -2094,7 +2094,7 @@
"PasswordResetMessageBody": "Hola, {user_name}:\n\nTu cuenta en línea para el servicio estará disponible después de que establezcas tu contraseña.\nPuedes usar el siguiente enlace durante las próximas 48 horas para establecer tu contraseña.\n\nConfigura tu contraseña: {action_link}\n\nSi no solicitó un restablecimiento de cuenta o contraseña, ignore este correo electrónico.\n\nGracias,\n{registered_to}",
"SendPasswordResetCode": "Enviar correo electrónico de restablecimiento de contraseña",
"CopyToClipboard": "Copiar al Portapapeles",
"VendorPopUpNotes": "Notas emergentes",
"VendorAlertNotes": "Notas emergentes",
"EraseMultipleObjectsWarning": "Advertencia: está a punto de borrar de forma permanente varios objetos.\n¿Estás seguro?",
"Errors": "Errores",
"BatchDeleteJob": "Trabajo de eliminación por lotes",

View File

@@ -65,7 +65,7 @@
"CustomerPhone3": "Home",
"CustomerPhone4": "Mobile",
"CustomerPhone5": "Pager",
"CustomerPopUpNotes": "Notes contextuelles",
"CustomerAlertNotes": "Notes contextuelles",
"CustomerTechNotes": "Notes d'utilisateur programmable",
"CustomerGroupDescription": "Description",
"CustomerGroupList": "Groupes de clients",
@@ -2094,7 +2094,7 @@
"PasswordResetMessageBody": "Bonjour {user_name},\n\nVotre compte de service en ligne est disponible une fois que vous avez défini votre mot de passe.\nVous pouvez utiliser le lien suivant pendant les 48 prochaines heures pour définir votre mot de passe.\n\nDéfinissez votre mot de passe: {action_link}\n\nSi vous n'avez pas demandé de réinitialisation de compte ou de mot de passe, veuillez ignorer cet e-mail.\n\nMerci,\n{registered_to}",
"SendPasswordResetCode": "Envoyer un e-mail de réinitialisation du mot de passe",
"CopyToClipboard": "Copier dans le Presse-papiers",
"VendorPopUpNotes": "Notes contextuelles",
"VendorAlertNotes": "Notes contextuelles",
"EraseMultipleObjectsWarning": "Attention: vous êtes sur le point d'effacer définitivement plusieurs objets.\nÊtes-vous sûr?",
"Errors": "les erreurs",
"BatchDeleteJob": "Tâche de suppression par lots",

View File

@@ -599,7 +599,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
//CUSTOMER
await ExecQueryAsync("CREATE TABLE acustomer (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, active BOOL NOT NULL, "
+ "notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, "
+ "webaddress TEXT, popupnotes TEXT, billheadoffice BOOL, technotes TEXT, accountnumber TEXT, contractexpires TIMESTAMP NULL, contractid BIGINT NULL REFERENCES acontract(id), "
+ "webaddress TEXT, alertnotes TEXT, billheadoffice BOOL, technotes TEXT, accountnumber TEXT, contractexpires TIMESTAMP NULL, contractid BIGINT NULL REFERENCES acontract(id), "
+ "phone1 TEXT, phone2 TEXT, phone3 TEXT, phone4 TEXT, phone5 TEXT, emailaddress TEXT, "
+ "postaddress TEXT, postcity TEXT, postregion TEXT, postcountry TEXT, postcode TEXT, address TEXT, city TEXT, region TEXT, country TEXT, latitude DECIMAL(9,6), longitude DECIMAL(9,6), "
+ "CONSTRAINT chk_contract_valid CHECK((contractid IS NULL) OR (contractid IS NOT NULL AND contractexpires IS NOT NULL)) "
@@ -646,7 +646,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
//VENDOR
await ExecQueryAsync("CREATE TABLE avendor (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, active BOOL NOT NULL, "
+ "notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, webaddress TEXT, popupnotes TEXT, accountnumber TEXT, "
+ "notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, webaddress TEXT, alertnotes TEXT, accountnumber TEXT, "
+ "contact TEXT, contactnotes TEXT, phone1 TEXT, phone2 TEXT, phone3 TEXT, phone4 TEXT, phone5 TEXT, emailaddress TEXT, "
+ "postaddress TEXT, postcity TEXT, postregion TEXT, postcountry TEXT, postcode TEXT, address TEXT, city TEXT, region TEXT, country TEXT, latitude DECIMAL(9,6), longitude DECIMAL(9,6))");
await ExecQueryAsync("ALTER TABLE auser ADD FOREIGN KEY (vendorid) REFERENCES avendor(id)");