This commit is contained in:
2021-10-19 16:20:10 +00:00
parent 00fe328e92
commit 177b8d3863
3 changed files with 41 additions and 27 deletions

2
.vscode/launch.json vendored
View File

@@ -52,7 +52,7 @@
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
"AYANOVA_SERVER_TEST_MODE": "true",
"AYANOVA_SERVER_TEST_MODE": "false",
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-7",
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin\\"

View File

@@ -676,8 +676,8 @@ namespace AyaNova
Console.WriteLine("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
Console.WriteLine("BOOT: COMPLETED - SERVER OPEN");
Console.WriteLine($"AYANOVA_USE_URLS setting: \"{ServerBootConfig.AYANOVA_USE_URLS}\"");
Console.WriteLine("Controlled shutdown: use AyaNova App. and \"Operations\" -> \"ServerState\" form");
Console.WriteLine("Forced immediate shutdown: Ctrl-c key combination");
Console.WriteLine("Controlled shutdown: use AyaNova App. and \"Operations\" -> \"ServerState\" -> \"Shut down server\" from menu");
Console.WriteLine("Force immediate shutdown: Ctrl+C keyboard shortcut");
Console.WriteLine("-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");

View File

@@ -229,8 +229,8 @@ namespace AyaNova.Util
//Generate one office person / secretary
await SeedUserAsync(log, 1, AuthorizationRoles.Service | AuthorizationRoles.Inventory | AuthorizationRoles.Accounting, UserType.NotService);
//4 other techs (must always be enough to have no dupes per workorder)
await SeedUserAsync(log, 4, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
//2 other techs (must always be enough to have no dupes per workorder)
await SeedUserAsync(log, 2, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
await SeedVendorAsync(log, 10);
await SeedUnitModelAsync(log, 10);
@@ -240,12 +240,10 @@ namespace AyaNova.Util
await SeedProjectAsync(log, 3);
await SeedServiceRateAsync(log, 5);
await SeedTravelRateAsync(log, 3);
//await SeedUnitAsync(log, 20);//5 times the customers or 5 units per customer
await SeedLoanLoanUnitAsync(log, 5);
await SeedCustomerServiceRequestAsync(log, 5);
await SeedPartWarehouseAsync(log, 5);
await SeedPartAsync(log, 20, 10000);
await SeedPartAsync(log, 20, 100);
await SeedPartAssemblyAsync(log, 5);
await SeedPurchaseOrderAsync(log, 10);
await SeedQuoteAsync(log, 5);
@@ -275,10 +273,19 @@ namespace AyaNova.Util
await SeedUserAsync(log, 1, AuthorizationRoles.BizAdmin | AuthorizationRoles.OpsAdminRestricted, UserType.NotService);
//One owner who doesn't control anything but views stuff
await SeedUserAsync(log, 1, AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted | AuthorizationRoles.OpsAdminRestricted | AuthorizationRoles.SalesRestricted, UserType.NotService);
//20 techs
await SeedUserAsync(log, 20, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
//2 subcontractors
await SeedUserAsync(log, 2, AuthorizationRoles.SubContractor, UserType.ServiceContractor);
////////////////////////////////////////////////
//TECHS (LICENSE CONSUMERS)
//trial license allows 1000
//
//regular techs
await SeedUserAsync(log, 5, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
//Restricted techs
// await SeedUserAsync(log, 2, AuthorizationRoles.TechRestricted | AuthorizationRoles.ServiceRestricted, UserType.Service);
//subcontractors
await SeedUserAsync(log, 1, AuthorizationRoles.SubContractor, UserType.ServiceContractor);
//Restricted subcontractors
// await SeedUserAsync(log, 1, AuthorizationRoles.SubContractorRestricted, UserType.ServiceContractor);
///////////////////////////////////////////
//3 generic office people people
await SeedUserAsync(log, 3, AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted, UserType.NotService);
//2 Full sales people
@@ -303,7 +310,7 @@ namespace AyaNova.Util
await SeedLoanLoanUnitAsync(log, 10);
await SeedCustomerServiceRequestAsync(log, 10);
await SeedPartWarehouseAsync(log, 10);
await SeedPartAsync(log, 100, 10000);
await SeedPartAsync(log, 100, 100);
await SeedPartAssemblyAsync(log, 5);
await SeedPurchaseOrderAsync(log, 30);
await SeedQuoteAsync(log, 5);
@@ -335,14 +342,21 @@ namespace AyaNova.Util
await SeedUserAsync(log, 2, AuthorizationRoles.BizAdmin | AuthorizationRoles.OpsAdminRestricted, UserType.NotService);
//owner / upper management who doesn't control anything but views stuff
await SeedUserAsync(log, 5, AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted | AuthorizationRoles.OpsAdminRestricted, UserType.NotService);
//TECHS
await SeedUserAsync(log, 50, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
//Restricted techs
await SeedUserAsync(log, 10, AuthorizationRoles.TechRestricted | AuthorizationRoles.ServiceRestricted, UserType.Service);
//20 subcontractors
await SeedUserAsync(log, 20, AuthorizationRoles.SubContractor, UserType.ServiceContractor);
//10 Restricted subcontractors
await SeedUserAsync(log, 10, AuthorizationRoles.SubContractorRestricted, UserType.ServiceContractor);
////////////////////////////////////////////////
//TECHS (LICENSE CONSUMERS)
//trial license allows 1000
//
//regular techs
await SeedUserAsync(log, 8, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
//Restricted techs
await SeedUserAsync(log, 1, AuthorizationRoles.TechRestricted | AuthorizationRoles.ServiceRestricted, UserType.Service);
//subcontractors
await SeedUserAsync(log, 1, AuthorizationRoles.SubContractor, UserType.ServiceContractor);
//Restricted subcontractors
await SeedUserAsync(log, 1, AuthorizationRoles.SubContractorRestricted, UserType.ServiceContractor);
///////////////////////////////////////////
//30 generic office people people
await SeedUserAsync(log, 30, AuthorizationRoles.ServiceRestricted | AuthorizationRoles.InventoryRestricted, UserType.NotService);
//10 Full sales people
@@ -371,7 +385,7 @@ namespace AyaNova.Util
await SeedLoanLoanUnitAsync(log, 20);
await SeedCustomerServiceRequestAsync(log, 20);
await SeedPartWarehouseAsync(log, 20);
await SeedPartAsync(log, 200, 10000);
await SeedPartAsync(log, 200, 100);
await SeedPartAssemblyAsync(log, 5);
await SeedPurchaseOrderAsync(log, 50);
await SeedQuoteAsync(log, 5);
@@ -410,13 +424,13 @@ namespace AyaNova.Util
//trial license allows 1000
//
//regular techs
await SeedUserAsync(log, 675, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
await SeedUserAsync(log, 15, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service);
//Restricted techs
await SeedUserAsync(log, 200, AuthorizationRoles.TechRestricted | AuthorizationRoles.ServiceRestricted, UserType.Service);
await SeedUserAsync(log, 2, AuthorizationRoles.TechRestricted | AuthorizationRoles.ServiceRestricted, UserType.Service);
//subcontractors
await SeedUserAsync(log, 80, AuthorizationRoles.SubContractor, UserType.ServiceContractor);
await SeedUserAsync(log, 2, AuthorizationRoles.SubContractor, UserType.ServiceContractor);
//Restricted subcontractors
await SeedUserAsync(log, 40, AuthorizationRoles.SubContractorRestricted, UserType.ServiceContractor);
await SeedUserAsync(log, 1, AuthorizationRoles.SubContractorRestricted, UserType.ServiceContractor);
///////////////////////////////////////////
//generic office people people
@@ -446,7 +460,7 @@ namespace AyaNova.Util
await SeedLoanLoanUnitAsync(log, 200);
await SeedCustomerServiceRequestAsync(log, 200);
await SeedPartWarehouseAsync(log, 200);
await SeedPartAsync(log, 10000, 10000);
await SeedPartAsync(log, 10000, 100);
await SeedPartAssemblyAsync(log, 500);
await SeedPurchaseOrderAsync(log, 1000);
await SeedQuoteAsync(log, 10);