This commit is contained in:
@@ -4294,12 +4294,19 @@ namespace AyaNova.Biz
|
||||
|
||||
bool isNew = currentObj == null;
|
||||
|
||||
WorkOrderItemPartRequest oProposed = (WorkOrderItemPartRequest)proposedObj;
|
||||
|
||||
var woId = await GetWorkOrderIdFromRelativeAsync(AyaType.WorkOrderItem, oProposed.WorkOrderItemId, ct);
|
||||
var WorkorderInfo = await ct.WorkOrder.AsNoTracking().Where(x => x.Id == woId).Select(x => new { Serial = x.Serial, Tags = x.Tags }).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
//sub wo tags here.
|
||||
proposedObj.Tags = WorkorderInfo.Tags;
|
||||
|
||||
//STANDARD EVENTS FOR ALL OBJECTS
|
||||
await NotifyEventHelper.ProcessStandardObjectEvents(ayaEvent, proposedObj, ct);
|
||||
|
||||
//SPECIFIC EVENTS FOR THIS OBJECT
|
||||
WorkOrderItemPartRequest o = (WorkOrderItemPartRequest)proposedObj;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -12,11 +12,13 @@ namespace AyaNova.Models
|
||||
//didn't want to end up with a zillion interfaces for all manner of stuff
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
public string Name { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
// public string Name { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
public string Name { get; set; }//any notification on these will require this so making it mandatory but will implement a workaround to return alt fields instead
|
||||
public bool? Active { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
public string Wiki { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
public string CustomFields { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
public List<string> Tags { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
// public List<string> Tags { get => throw new System.NotImplementedException(); set => throw new System.NotImplementedException(); }
|
||||
public List<string> Tags { get; set; }//Notification on objects require this so will implement workaround in object instead
|
||||
public AyaNova.Biz.AyaType AyaType { get; }
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,13 @@ namespace AyaNova.Models
|
||||
public string CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
/*
|
||||
|
||||
todo: Consider adding latitude / longitude to wo, quote, pm objects
|
||||
|
||||
@@ -40,11 +40,19 @@ namespace AyaNova.Models
|
||||
public string Text2 { get; set; }
|
||||
public List<PurchaseOrderItem> Items { get; set; } = new List<PurchaseOrderItem>();
|
||||
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
public PurchaseOrder()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public AyaType AyaType { get => AyaType.PurchaseOrder; }
|
||||
|
||||
|
||||
@@ -22,6 +22,11 @@ namespace AyaNova.Models
|
||||
public string CustomFields { get; set; }
|
||||
public List<string> Tags { get; set; }
|
||||
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
/*
|
||||
|
||||
todo: Consider adding latitude / longitude to wo, quote, pm objects
|
||||
|
||||
@@ -67,6 +67,13 @@ namespace AyaNova.Models
|
||||
public decimal? Latitude { get; set; }
|
||||
public decimal? Longitude { get; set; }
|
||||
|
||||
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
|
||||
public Unit()
|
||||
{
|
||||
Tags = new List<string>();
|
||||
@@ -75,6 +82,8 @@ namespace AyaNova.Models
|
||||
[NotMapped, JsonIgnore]
|
||||
public AyaType AyaType { get => AyaType.Unit; }
|
||||
|
||||
|
||||
|
||||
// //convenience links
|
||||
// [JsonIgnore]
|
||||
// public Customer Customer { get; set; }
|
||||
|
||||
@@ -85,6 +85,10 @@ namespace AyaNova.Models
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public AyaType AyaType { get => AyaType.WorkOrder; }
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
}//eoc
|
||||
|
||||
}//eons
|
||||
|
||||
@@ -31,6 +31,10 @@ namespace AyaNova.Models
|
||||
public bool WarrantyService { get; set; } = false;
|
||||
public int Sequence { get; set; }
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
//Principle
|
||||
[JsonIgnore]
|
||||
public WorkOrder WorkOrder { get; set; }
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
@@ -43,6 +44,11 @@ namespace AyaNova.Models
|
||||
[JsonIgnore]
|
||||
public WorkOrderItem WorkOrderItem { get; set; }
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public AyaType AyaType { get => AyaType.WorkOrderItemExpense; }
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
@@ -58,6 +59,12 @@ namespace AyaNova.Models
|
||||
[NotMapped, JsonIgnore]
|
||||
public AyaType AyaType { get => AyaType.WorkOrderItemLabor; }
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
}//eoc
|
||||
}//eons
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
@@ -50,7 +51,11 @@ namespace AyaNova.Models
|
||||
[NotMapped]
|
||||
public decimal LineTotalViz { get; set; }//line total netViz + taxes
|
||||
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public long WorkOrderItemId { get; set; }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
@@ -47,7 +48,11 @@ namespace AyaNova.Models
|
||||
[NotMapped]
|
||||
public decimal LineTotalViz { get; set; }//line total netViz + taxes
|
||||
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public long WorkOrderItemId { get; set; }
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
@@ -51,6 +51,11 @@ namespace AyaNova.Models
|
||||
[NotMapped]
|
||||
public decimal LineTotalViz { get; set; }//line total netViz + taxes
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public long WorkOrderItemId { get; set; }
|
||||
|
||||
@@ -50,9 +50,11 @@ namespace AyaNova.Models
|
||||
[NotMapped, JsonIgnore]
|
||||
public AyaType AyaType { get => AyaType.WorkOrderItemPartRequest; }
|
||||
|
||||
//tag workaround for notification, workorderbiz will substitute workorder tags instead when processing standard notification
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
}//eoc
|
||||
}//eons
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
@@ -21,6 +22,12 @@ namespace AyaNova.Models
|
||||
public string ServiceRateViz { get; set; }
|
||||
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public long WorkOrderItemId { get; set; }
|
||||
[JsonIgnore]
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using AyaNova.Biz;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
@@ -26,6 +27,11 @@ namespace AyaNova.Models
|
||||
public string CompletedByUserViz { get; set; }
|
||||
public DateTime? CompletedDate { get; set; }
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public long WorkOrderItemId { get; set; }
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using AyaNova.Biz;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
@@ -29,28 +30,6 @@ namespace AyaNova.Models
|
||||
public decimal Distance { get; set; }
|
||||
|
||||
|
||||
// //PRICE FIELDS
|
||||
// [Required]
|
||||
// public decimal Cost { get; set; }
|
||||
// [Required]
|
||||
// public decimal ListPrice { get; set; }
|
||||
// [Required]
|
||||
// public decimal Price { get; set; }
|
||||
// [Required]
|
||||
// public string TaxName { get; set; }
|
||||
// [Required]
|
||||
// public decimal TaxAPct { get; set; }
|
||||
// [Required]
|
||||
// public decimal TaxBPct { get; set; }
|
||||
// [Required]
|
||||
// public bool TaxOnTax { get; set; }
|
||||
// [NotMapped]
|
||||
// public decimal TaxAViz { get; set; }
|
||||
// [NotMapped]
|
||||
// public decimal TaxBViz { get; set; }
|
||||
// [NotMapped]
|
||||
// public decimal LineTotalViz { get; set; }
|
||||
|
||||
//Standard pricing fields (mostly to support printed reports though some show in UI)
|
||||
//some not to be sent with record depending on role (i.e. cost and charge in some cases)
|
||||
public decimal? PriceOverride { get; set; }//user entered manually overridden price, if null then ignored in calcs otherwise this *is* the price even if zero
|
||||
@@ -71,6 +50,11 @@ namespace AyaNova.Models
|
||||
[NotMapped]
|
||||
public decimal LineTotalViz { get; set; }//line total netViz + taxes
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public long WorkOrderItemId { get; set; }
|
||||
|
||||
@@ -25,6 +25,11 @@ namespace AyaNova.Models
|
||||
[JsonIgnore]
|
||||
public WorkOrderItem WorkOrderItem { get; set; }
|
||||
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
[NotMapped, JsonIgnore]
|
||||
public AyaType AyaType { get => AyaType.WorkOrderItemUnit; }
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Newtonsoft.Json;
|
||||
using AyaNova.Biz;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace AyaNova.Models
|
||||
{
|
||||
@@ -23,6 +24,12 @@ namespace AyaNova.Models
|
||||
[NotMapped]
|
||||
public string UserViz { get; set; }
|
||||
|
||||
//workaround for notification
|
||||
[NotMapped, JsonIgnore]
|
||||
public List<string> Tags { get; set; } = new List<string>();
|
||||
[NotMapped, JsonIgnore]
|
||||
public string Name { get; set; }
|
||||
|
||||
//UTILITY FIELDS
|
||||
|
||||
//related
|
||||
|
||||
Reference in New Issue
Block a user