This commit is contained in:
2021-07-21 23:39:19 +00:00
parent 4f6cee11f8
commit db7a03e719
3 changed files with 19 additions and 8 deletions

2
.vscode/launch.json vendored
View File

@@ -53,7 +53,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_13\\bin\\"

View File

@@ -1115,6 +1115,16 @@ namespace AyaNova.Biz
}
else
o.ContractViz = "-";
if (o.FromQuoteId != null)
o.FromQuoteViz = await ct.Quote.AsNoTracking().Where(x => x.Id == o.FromQuoteId).Select(x => x.Serial.ToString()).FirstOrDefaultAsync();
if (o.FromPMId != null)
o.FromPMViz = await ct.PM.AsNoTracking().Where(x => x.Id == o.FromPMId).Select(x => x.Serial.ToString()).FirstOrDefaultAsync();
if (o.FromCSRId != null)
o.FromCSRViz = await ct.CustomerServiceRequest.AsNoTracking().Where(x => x.Id == o.FromCSRId).Select(x => x.Name).FirstOrDefaultAsync();
}
@@ -1583,7 +1593,7 @@ namespace AyaNova.Biz
wo.LastStatusId = newObject.WorkOrderStatusId;
await ct.SaveChangesAsync();
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, newObject.Id, AyaType.WorkOrderStatus, AyaEvent.Created), ct);
await StateHandlePotentialNotificationEvent(AyaEvent.Created, newObject);
return newObject;

View File

@@ -90,12 +90,13 @@ namespace AyaNova.Models
public bool IsLockedAtServer { get; set; } = false;//signal to client that it came from the server in a locked state
[NotMapped]
public string AlertViz { get; set; } = null;
// [NotMapped]
// public bool HasPartCosts { get; set; } = false;//signal to client that part costs were not populated (due to user rights / role / type)
// [NotMapped]
// public bool HasTravelAndLaborRateCosts { get; set; } = false;
// [NotMapped]
// public bool HasLoanItemCosts { get; set; } = false;
[NotMapped]
public string FromQuoteViz { get; set; }
[NotMapped]
public string FromPMViz { get; set; }
[NotMapped]
public string FromCSRViz { get; set; }
[NotMapped]
public bool IsCompleteRecord { get; set; } = true;//indicates if some items were removed due to user role / type restrictions (i.e. woitems they are not scheduled on)