case 4341

This commit is contained in:
2022-12-13 22:17:39 +00:00
parent b74cc584b3
commit b090c1040d
22 changed files with 65 additions and 38 deletions

View File

@@ -1,23 +1,4 @@
New laptop research LAST DOCUMENTATION LEFT OFF AT
=-=-=-=-=-=-=-=-=-=- HeadOffices seems to be done whatever is next below
- NEED: need ability to quickly be back up and running if stolen or lost or broken, this is a huge consideration to factor in wherever possible
- Time saved with faster computer more than makes up for the purchase cost, even 80 seconds a day lost over 3 years is the price of a new laptop in lost productivity and wages etc
- 3 year replacement cycle or faster if slowing down production is recommended
- Security is an important consideration, newer laptops that can run latest OS are more secure and this is a real consideration for me as I'm using it to manage everything
- Must support and use biometric security, I might be travelling / homeless and need a secure computer
- MULTI APP RUNNING AT ONCE; I used a *lot* of open windows and multiple things running at once, i'm getting by with 12gb of ram but is that enough and will windows 11 eat up more ram?
- Lowest bloatware and easily removed bloatware
- anti theft options, find my pc options?
- Most important aspects: Processor speed, Ram, storage speed. Secondary: security features, portability, battery life, keyboard, Tertiary: display (will use monitor most of time)
New phone research
=-=-=-=-=-=-=-=-=-
- Security!!! New phone = more secure with latest OS if it can't run latest os it's insecure by definition; older phone could be a huge security risk
- Must use biometric security as good as possible
- anti theft / find my phone options?

View File

@@ -172,7 +172,7 @@ namespace AyaNova.Api.Controllers
return Ok(ApiOkResponse.Response(new return Ok(ApiOkResponse.Response(new
{ {
customerpost = new PostalAddressRecord(cust.Name, cust.PostAddress, cust.PostCity, cust.PostRegion, cust.PostCountry, cust.PostCode), customerpost = new PostalAddressRecord(cust.Name, cust.PostAddress, cust.PostCity, cust.PostRegion, cust.PostCountry, cust.PostCode),
customerphys = new AddressRecord(cust.Name, cust.Address, cust.City, cust.Region, cust.Country, cust.Latitude, cust.Longitude), customerphys = new AddressRecord(cust.Name, cust.Address, cust.City, cust.Region, cust.Country, cust.AddressPostal, cust.Latitude, cust.Longitude),
headofficepost = (head != null ? new PostalAddressRecord(head.Name, head.PostAddress, head.PostCity, head.PostRegion, head.PostCountry, head.PostCode) : new PostalAddressRecord("", "", "", "", "", "")) headofficepost = (head != null ? new PostalAddressRecord(head.Name, head.PostAddress, head.PostCity, head.PostRegion, head.PostCountry, head.PostCode) : new PostalAddressRecord("", "", "", "", "", ""))
})); }));
} }

View File

@@ -174,7 +174,7 @@ namespace AyaNova.Api.Controllers
return Ok(ApiOkResponse.Response(new return Ok(ApiOkResponse.Response(new
{ {
unit = new AddressRecord(unt.Serial, unt.Address, unt.City, unt.Region, unt.Country, unt.Latitude, unt.Longitude) unit = new AddressRecord(unt.Serial, unt.Address, unt.City, unt.Region, unt.Country, unt.AddressPostal, unt.Latitude, unt.Longitude)
})); }));
} }

View File

@@ -249,6 +249,7 @@ namespace AyaNova.Biz
.AddText(obj.City) .AddText(obj.City)
.AddText(obj.Region) .AddText(obj.Region)
.AddText(obj.Country) .AddText(obj.Country)
.AddText(obj.AddressPostal)
.AddCustomFields(obj.CustomFields); .AddCustomFields(obj.CustomFields);
} }

View File

@@ -219,6 +219,7 @@ namespace AyaNova.Biz
.AddText(obj.City) .AddText(obj.City)
.AddText(obj.Region) .AddText(obj.Region)
.AddText(obj.Country) .AddText(obj.Country)
.AddText(obj.AddressPostal)
.AddCustomFields(obj.CustomFields); .AddCustomFields(obj.CustomFields);
} }

View File

@@ -652,6 +652,7 @@ namespace AyaNova.Biz
.AddText(obj.City) .AddText(obj.City)
.AddText(obj.Region) .AddText(obj.Region)
.AddText(obj.Country) .AddText(obj.Country)
.AddText(obj.AddressPostal)
.AddText(obj.Wiki) .AddText(obj.Wiki)
.AddText(obj.Tags) .AddText(obj.Tags)
.AddCustomFields(obj.CustomFields); .AddCustomFields(obj.CustomFields);

View File

@@ -632,6 +632,7 @@ namespace AyaNova.Biz
.AddText(obj.City) .AddText(obj.City)
.AddText(obj.Region) .AddText(obj.Region)
.AddText(obj.Country) .AddText(obj.Country)
.AddText(obj.AddressPostal)
.AddText(obj.Wiki) .AddText(obj.Wiki)
.AddText(obj.Tags) .AddText(obj.Tags)
.AddCustomFields(obj.CustomFields); .AddCustomFields(obj.CustomFields);

View File

@@ -669,7 +669,7 @@ namespace AyaNova.Biz
sLongitude = ServerGlobalBizSettings.Cache.Longitude.ToString(); sLongitude = ServerGlobalBizSettings.Cache.Longitude.ToString();
var serverMeta = $"{{ayApiUrl:`{apiUrl}`, HasSmallLogo:{HasSmallLogo}, HasMediumLogo:{HasMediumLogo}, HasLargeLogo:{HasLargeLogo},CompanyName: `{AyaNova.Core.License.ActiveKey.RegisteredTo}`,CompanyWebAddress:`{ServerGlobalBizSettings.Cache.WebAddress}`,CompanyEmailAddress:`{ServerGlobalBizSettings.Cache.EmailAddress}`,CompanyPhone1:`{ServerGlobalBizSettings.Cache.Phone1}`,CompanyPhone2:`{ServerGlobalBizSettings.Cache.Phone2}`,HasPostalAddress:{HasPostalAddress},CompanyPostAddress:`{ServerGlobalBizSettings.Cache.PostAddress}`,CompanyPostCity:`{ServerGlobalBizSettings.Cache.PostCity}`,CompanyPostRegion:`{ServerGlobalBizSettings.Cache.PostRegion}`,CompanyPostCountry:`{ServerGlobalBizSettings.Cache.PostCountry}`,CompanyPostCode:`{ServerGlobalBizSettings.Cache.PostCode}`,HasStreetAddress:{HasStreetAddress},CompanyAddress:`{ServerGlobalBizSettings.Cache.Address}`,CompanyCity:`{ServerGlobalBizSettings.Cache.City}`,CompanyRegion:`{ServerGlobalBizSettings.Cache.Region}`,CompanyCountry:`{ServerGlobalBizSettings.Cache.Country}`,CompanyLatitude:{sLatitude},CompanyLongitude:{sLongitude}}}"; var serverMeta = $"{{ayApiUrl:`{apiUrl}`, HasSmallLogo:{HasSmallLogo}, HasMediumLogo:{HasMediumLogo}, HasLargeLogo:{HasLargeLogo},CompanyName: `{AyaNova.Core.License.ActiveKey.RegisteredTo}`,CompanyWebAddress:`{ServerGlobalBizSettings.Cache.WebAddress}`,CompanyEmailAddress:`{ServerGlobalBizSettings.Cache.EmailAddress}`,CompanyPhone1:`{ServerGlobalBizSettings.Cache.Phone1}`,CompanyPhone2:`{ServerGlobalBizSettings.Cache.Phone2}`,HasPostalAddress:{HasPostalAddress},CompanyPostAddress:`{ServerGlobalBizSettings.Cache.PostAddress}`,CompanyPostCity:`{ServerGlobalBizSettings.Cache.PostCity}`,CompanyPostRegion:`{ServerGlobalBizSettings.Cache.PostRegion}`,CompanyPostCountry:`{ServerGlobalBizSettings.Cache.PostCountry}`,CompanyPostCode:`{ServerGlobalBizSettings.Cache.PostCode}`,HasStreetAddress:{HasStreetAddress},CompanyAddress:`{ServerGlobalBizSettings.Cache.Address}`,CompanyCity:`{ServerGlobalBizSettings.Cache.City}`,CompanyRegion:`{ServerGlobalBizSettings.Cache.Region}`,CompanyCountry:`{ServerGlobalBizSettings.Cache.Country}`,CompanyAddressPostal:`{ServerGlobalBizSettings.Cache.AddressPostal}`,CompanyLatitude:{sLatitude},CompanyLongitude:{sLongitude}}}";
log.LogDebug($"Preparing page: adding Report meta data"); log.LogDebug($"Preparing page: adding Report meta data");

View File

@@ -225,6 +225,7 @@ namespace AyaNova.Biz
.AddText(obj.City) .AddText(obj.City)
.AddText(obj.Region) .AddText(obj.Region)
.AddText(obj.Country) .AddText(obj.Country)
.AddText(obj.AddressPostal)
.AddCustomFields(obj.CustomFields); .AddCustomFields(obj.CustomFields);
} }

View File

@@ -243,6 +243,7 @@ namespace AyaNova.Biz
.AddText(obj.City) .AddText(obj.City)
.AddText(obj.Region) .AddText(obj.Region)
.AddText(obj.Country) .AddText(obj.Country)
.AddText(obj.AddressPostal)
.AddCustomFields(obj.CustomFields); .AddCustomFields(obj.CustomFields);
} }

View File

@@ -195,7 +195,7 @@ namespace AyaNova.Biz
//https://docs.microsoft.com/en-us/ef/core/querying/related-data //https://docs.microsoft.com/en-us/ef/core/querying/related-data
//docs say this will not query twice but will recognize the duplicate woitem bit which is required for multiple grandchild collections //docs say this will not query twice but will recognize the duplicate woitem bit which is required for multiple grandchild collections
return await ct.WorkOrder.AsSplitQuery().AsNoTracking() return await ct.WorkOrder.AsSplitQuery().AsNoTracking()
.Include(s => s.States.OrderBy(item=> item.Id)) .Include(s => s.States.OrderBy(item => item.Id))
.Include(w => w.Items.OrderBy(item => item.Sequence)) .Include(w => w.Items.OrderBy(item => item.Sequence))
.ThenInclude(wi => wi.Expenses) .ThenInclude(wi => wi.Expenses)
.Include(w => w.Items) .Include(w => w.Items)
@@ -782,6 +782,7 @@ namespace AyaNova.Biz
.AddText(obj.City) .AddText(obj.City)
.AddText(obj.Region) .AddText(obj.Region)
.AddText(obj.Country) .AddText(obj.Country)
.AddText(obj.AddressPostal)
.AddText(obj.Wiki) .AddText(obj.Wiki)
.AddText(obj.Tags) .AddText(obj.Tags)
.AddCustomFields(obj.CustomFields); .AddCustomFields(obj.CustomFields);

View File

@@ -63,6 +63,7 @@ namespace AyaNova.Models
public string City { get; set; } public string City { get; set; }
public string Region { get; set; } public string Region { get; set; }
public string Country { get; set; } public string Country { get; set; }
public string AddressPostal { get; set; }
public decimal? Latitude { get; set; } public decimal? Latitude { get; set; }
public decimal? Longitude { get; set; } public decimal? Longitude { get; set; }

View File

@@ -59,6 +59,7 @@ namespace AyaNova.Models
public string City { get; set; } public string City { get; set; }
public string Region { get; set; } public string Region { get; set; }
public string Country { get; set; } public string Country { get; set; }
public string AddressPostal { get; set; }
public decimal? Latitude { get; set; } public decimal? Latitude { get; set; }
public decimal? Longitude { get; set; } public decimal? Longitude { get; set; }

View File

@@ -51,6 +51,7 @@ namespace AyaNova.Models
public string City { get; set; } public string City { get; set; }
public string Region { get; set; } public string Region { get; set; }
public string Country { get; set; } public string Country { get; set; }
public string AddressPostal { get; set; }
public decimal? Latitude { get; set; } public decimal? Latitude { get; set; }
public decimal? Longitude { get; set; } public decimal? Longitude { get; set; }

View File

@@ -91,6 +91,7 @@ namespace AyaNova.Models
public string City { get; set; } public string City { get; set; }
public string Region { get; set; } public string Region { get; set; }
public string Country { get; set; } public string Country { get; set; }
public string AddressPostal { get; set; }
public decimal? Latitude { get; set; } public decimal? Latitude { get; set; }
public decimal? Longitude { get; set; } public decimal? Longitude { get; set; }

View File

@@ -84,6 +84,7 @@ namespace AyaNova.Models
public string City { get; set; } public string City { get; set; }
public string Region { get; set; } public string Region { get; set; }
public string Country { get; set; } public string Country { get; set; }
public string AddressPostal { get; set; }
public decimal? Latitude { get; set; } public decimal? Latitude { get; set; }
public decimal? Longitude { get; set; } public decimal? Longitude { get; set; }

View File

@@ -77,6 +77,7 @@ namespace AyaNova.Models
public string City { get; set; } public string City { get; set; }
public string Region { get; set; } public string Region { get; set; }
public string Country { get; set; } public string Country { get; set; }
public string AddressPostal { get; set; }
public decimal? Latitude { get; set; } public decimal? Latitude { get; set; }
public decimal? Longitude { get; set; } public decimal? Longitude { get; set; }

View File

@@ -48,6 +48,7 @@ namespace AyaNova.Models
public string City { get; set; } public string City { get; set; }
public string Region { get; set; } public string Region { get; set; }
public string Country { get; set; } public string Country { get; set; }
public string AddressPostal { get; set; }
public decimal? Latitude { get; set; } public decimal? Latitude { get; set; }
public decimal? Longitude { get; set; } public decimal? Longitude { get; set; }

View File

@@ -82,6 +82,7 @@ namespace AyaNova.Models
public string City { get; set; } public string City { get; set; }
public string Region { get; set; } public string Region { get; set; }
public string Country { get; set; } public string Country { get; set; }
public string AddressPostal { get; set; }
public decimal? Latitude { get; set; } public decimal? Latitude { get; set; }
public decimal? Longitude { get; set; } public decimal? Longitude { get; set; }

View File

@@ -2,7 +2,7 @@
namespace AyaNova.Models namespace AyaNova.Models
{ {
//physical //physical
public record AddressRecord(string Name, string Address, string City, string Region, string Country, decimal? Latitude, decimal? Longitude); public record AddressRecord(string Name, string Address, string City, string Region, string Country, string AddressPostal, decimal? Latitude, decimal? Longitude);
//postal //postal
public record PostalAddressRecord(string Name, string PostAddress, string PostCity, string PostRegion, string PostCountry, string PostCode); public record PostalAddressRecord(string Name, string PostAddress, string PostCity, string PostRegion, string PostCountry, string PostCode);
} }

View File

@@ -20,7 +20,7 @@ namespace AyaNova.Util
/////////// CHANGE THIS ON NEW SCHEMA UPDATE //////////////////// /////////// CHANGE THIS ON NEW SCHEMA UPDATE ////////////////////
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 13; private const int DESIRED_SCHEMA_LEVEL = 14;
internal const long EXPECTED_COLUMN_COUNT = 1380; internal const long EXPECTED_COLUMN_COUNT = 1380;
internal const long EXPECTED_INDEX_COUNT = 160; internal const long EXPECTED_INDEX_COUNT = 160;
@@ -1722,6 +1722,38 @@ CREATE OR REPLACE VIEW public.viewpartinventorylist
} }
//////////////////////////////////////////////////
//
// case 4341
//
if (currentSchema < 14)
{
LogUpdateMessage(log);
await ExecQueryAsync("ALTER TABLE aglobalbizsettings ADD COLUMN postcodestreet TEXT;");
await ExecQueryAsync("ALTER TABLE acustomer ADD COLUMN postcodestreet TEXT;");
await ExecQueryAsync("ALTER TABLE aheadoffice ADD COLUMN postcodestreet TEXT;");
await ExecQueryAsync("ALTER TABLE avendor ADD COLUMN postcodestreet TEXT;");
await ExecQueryAsync("ALTER TABLE aunit ADD COLUMN postcodestreet TEXT;");
await ExecQueryAsync("ALTER TABLE aworkorder ADD COLUMN postcodestreet TEXT;");
await ExecQueryAsync("ALTER TABLE aquote ADD COLUMN postcodestreet TEXT;");
await ExecQueryAsync("ALTER TABLE apm ADD COLUMN postcodestreet TEXT;");
//english translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'AddressPostal', 'Postal / ZIP code' FROM atranslation t where t.baselanguage = 'en'");
//spanish translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'AddressPostal', 'Código postal' FROM atranslation t where t.baselanguage = 'es'");
//french translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'AddressPostal', 'Code postal' FROM atranslation t where t.baselanguage = 'fr'");
//german translations
await ExecQueryAsync("INSERT INTO atranslationitem(translationid,key,display) SELECT t.id, 'AddressPostal', 'Postleitzahl' FROM atranslation t where t.baselanguage = 'de'");
await SetSchemaLevelAsync(++currentSchema);
}
//######################################### //#########################################

View File

@@ -1775,7 +1775,7 @@ namespace AyaNova.Util
gbiz.PostCity = gbiz.City; gbiz.PostCity = gbiz.City;
gbiz.PostRegion = gbiz.Region; gbiz.PostRegion = gbiz.Region;
gbiz.PostCountry = gbiz.Country; gbiz.PostCountry = gbiz.Country;
gbiz.PostCode = Fake.Address.ZipCode(); gbiz.AddressPostal = gbiz.PostCode = Fake.Address.ZipCode();
gbiz.Phone1 = Fake.Phone.PhoneNumber(); gbiz.Phone1 = Fake.Phone.PhoneNumber();
gbiz.Phone2 = Fake.Phone.PhoneNumber(); gbiz.Phone2 = Fake.Phone.PhoneNumber();
gbiz.WebAddress = Fake.Internet.Protocol() + "://example." + Fake.Internet.DomainSuffix(); gbiz.WebAddress = Fake.Internet.Protocol() + "://example." + Fake.Internet.DomainSuffix();
@@ -1965,7 +1965,7 @@ namespace AyaNova.Util
o.PostCity = o.City; o.PostCity = o.City;
o.PostRegion = o.Region; o.PostRegion = o.Region;
o.PostCountry = o.Country; o.PostCountry = o.Country;
o.PostCode = Fake.Address.ZipCode(); o.AddressPostal = o.PostCode = Fake.Address.ZipCode();
o.Phone1 = Fake.Phone.PhoneNumber(); o.Phone1 = Fake.Phone.PhoneNumber();
o.Phone2 = Fake.Phone.PhoneNumber(); o.Phone2 = Fake.Phone.PhoneNumber();
@@ -2049,7 +2049,7 @@ namespace AyaNova.Util
o.PostCity = o.City; o.PostCity = o.City;
o.PostRegion = o.Region; o.PostRegion = o.Region;
o.PostCountry = o.Country; o.PostCountry = o.Country;
o.PostCode = Fake.Address.ZipCode(); o.AddressPostal = o.PostCode = Fake.Address.ZipCode();
o.Phone1 = Fake.Phone.PhoneNumber(); o.Phone1 = Fake.Phone.PhoneNumber();
o.Phone2 = Fake.Phone.PhoneNumber(); o.Phone2 = Fake.Phone.PhoneNumber();
@@ -2995,7 +2995,7 @@ namespace AyaNova.Util
o.City = cust.City; o.City = cust.City;
o.Region = cust.Region; o.Region = cust.Region;
o.Country = cust.Country; o.Country = cust.Country;
o.AddressPostal = cust.PostCode;
if (cust.BillHeadOffice && cust.HeadOfficeId != null) if (cust.BillHeadOffice && cust.HeadOfficeId != null)
{ {
@@ -3004,7 +3004,7 @@ namespace AyaNova.Util
o.PostCity = head.PostCity; o.PostCity = head.PostCity;
o.PostRegion = head.PostRegion; o.PostRegion = head.PostRegion;
o.PostCountry = head.PostCountry; o.PostCountry = head.PostCountry;
o.PostCode = head.PostCode;
} }
else else
{ {
@@ -3013,7 +3013,6 @@ namespace AyaNova.Util
o.PostCity = cust.PostCity; o.PostCity = cust.PostCity;
o.PostRegion = cust.PostRegion; o.PostRegion = cust.PostRegion;
o.PostCountry = cust.PostCountry; o.PostCountry = cust.PostCountry;
o.PostCode = cust.PostCode;
} }
} }
@@ -3475,7 +3474,7 @@ namespace AyaNova.Util
o.City = cust.City; o.City = cust.City;
o.Region = cust.Region; o.Region = cust.Region;
o.Country = cust.Country; o.Country = cust.Country;
o.AddressPostal = cust.PostCode;
if (cust.BillHeadOffice && cust.HeadOfficeId != null) if (cust.BillHeadOffice && cust.HeadOfficeId != null)
{ {