This commit is contained in:
@@ -8,7 +8,11 @@ namespace AyaNova.DataList
|
||||
public CustomerServiceRequestDataList()
|
||||
{
|
||||
DefaultListObjectType = AyaType.CustomerServiceRequest;
|
||||
SQLFrom = "from acustomerservicerequest left join auser on (acustomerservicerequest.customerservicerequestoverseerid=auser.id)";
|
||||
SQLFrom = "from acustomerservicerequest left join " +
|
||||
"auser on (acustomerservicerequest.customerservicerequestoverseerid=auser.id) " +
|
||||
"left join aunit on (acustomerservicerequest.unitid) " +
|
||||
"left join aworkorderitem as wi on (acustomerservicerequest.workorderitemid=wi.id)" +
|
||||
"left join aworkorder as w on (wi.workorderid=w.id)";
|
||||
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||
|
||||
@@ -18,32 +22,24 @@ namespace AyaNova.DataList
|
||||
dynamic cm = null;
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "customerservicerequestname";
|
||||
cm.sort = "+";
|
||||
cm.fld = "Created";
|
||||
cm.sort = "-";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "CustomerServiceRequestCustomerServiceRequestOverseerID";
|
||||
cm.fld = "Customer";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "CustomerServiceRequestDateStarted";
|
||||
cm.fld = "CustomerServiceRequestTitle";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "CustomerServiceRequestDateCompleted";
|
||||
cm.fld = "CustomerServiceRequestPriority";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "CustomerServiceRequestAccountNumber";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "customerservicerequestactive";
|
||||
dlistView.Add(cm);
|
||||
|
||||
cm = new JObject();
|
||||
cm.fld = "customerservicerequesttags";
|
||||
cm.fld = "CustomerServiceRequestStatus";
|
||||
dlistView.Add(cm);
|
||||
|
||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||
@@ -54,8 +50,8 @@ namespace AyaNova.DataList
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "CustomerServiceRequestName",
|
||||
FieldKey = "customerservicerequestname",
|
||||
TKey = "CustomerServiceRequestTitle",
|
||||
FieldKey = "CustomerServiceRequestTitle",
|
||||
AyaObjectType = (int)AyaType.CustomerServiceRequest,
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlIdColumnName = "acustomerservicerequest.id",
|
||||
@@ -65,20 +61,12 @@ namespace AyaNova.DataList
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "CustomerServiceRequestNotes",
|
||||
FieldKey = "customerservicerequestnotes",
|
||||
TKey = "CustomerServiceRequestDetails",
|
||||
FieldKey = "CustomerServiceRequestDetails",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "acustomerservicerequest.notes"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "Active",
|
||||
FieldKey = "customerservicerequestactive",
|
||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
||||
SqlValueColumnName = "acustomerservicerequest.active"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "Tags",
|
||||
@@ -87,21 +75,38 @@ namespace AyaNova.DataList
|
||||
SqlValueColumnName = "acustomerservicerequest.tags"
|
||||
});
|
||||
|
||||
|
||||
//------------
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "CustomerServiceRequestAccountNumber",
|
||||
FieldKey = "CustomerServiceRequestAccountNumber",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "acustomerservicerequest.accountnumber"
|
||||
TKey = "Created",
|
||||
FieldKey = "Created",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "acustomerservicerequest.daterequested"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
FieldKey = "CustomerServiceRequestCustomerServiceRequestOverseerID",
|
||||
TKey = "CustomerServiceRequestCustomerServiceRequestOverseerID",
|
||||
FieldKey = "CustomerServiceRequestItemUnitID",
|
||||
TKey = "CustomerServiceRequestItemUnitID",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
AyaObjectType = (int)AyaType.Unit,
|
||||
SqlIdColumnName = "aunit.id",
|
||||
SqlValueColumnName = "aunit.serial"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
FieldKey = "WorkOrder",
|
||||
TKey = "WorkOrder",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
AyaObjectType = (int)AyaType.WorkOrderItem,
|
||||
SqlIdColumnName = "wi.id",
|
||||
SqlValueColumnName = "w.serial"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
FieldKey = "CustomerServiceRequestRequestedBy",
|
||||
TKey = "CustomerServiceRequestRequestedBy",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
AyaObjectType = (int)AyaType.User,
|
||||
SqlIdColumnName = "auser.id",
|
||||
@@ -110,19 +115,36 @@ namespace AyaNova.DataList
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "CustomerServiceRequestDateStarted",
|
||||
FieldKey = "CustomerServiceRequestDateStarted",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "acustomerservicerequest.datestarted"
|
||||
TKey = "CustomerServiceRequestCustomerReferenceNumber",
|
||||
FieldKey = "CustomerServiceRequestCustomerReferenceNumber",
|
||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||
SqlValueColumnName = "acustomerservicerequest.customerreferencenumber"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "CustomerServiceRequestDateCompleted",
|
||||
FieldKey = "CustomerServiceRequestDateCompleted",
|
||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||
SqlValueColumnName = "acustomerservicerequest.datecompleted"
|
||||
TKey = "CustomerServiceRequestStatus",
|
||||
FieldKey = "CustomerServiceRequestStatus",
|
||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(CustomerServiceRequestStatus).ToString()),
|
||||
SqlValueColumnName = "acustomerservicerequest.status"
|
||||
});
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||
{
|
||||
TKey = "CustomerServiceRequestPriority",
|
||||
FieldKey = "CustomerServiceRequestPriority",
|
||||
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||
EnumType = AyaNova.Util.StringUtil.TrimTypeName(typeof(CustomerServiceRequestPriority).ToString()),
|
||||
SqlValueColumnName = "acustomerservicerequest.priority"
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//-----------
|
||||
|
||||
FieldDefinitions.Add(new AyaDataListFieldDefinition { TKey = "CustomerServiceRequestCustom1", FieldKey = "customerservicerequestcustom1", IsCustomField = true, IsFilterable = false, IsSortable = false, SqlValueColumnName = "acustomerservicerequest.customfields" });
|
||||
|
||||
@@ -894,7 +894,6 @@ namespace AyaNova.Biz
|
||||
List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestTitle", FieldKey = "CustomerServiceRequestTitle", Hideable = false });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestDetails", FieldKey = "CustomerServiceRequestDetails" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "Active", FieldKey = "Active", Hideable = false });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "Tags", FieldKey = "Tags" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
|
||||
l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });
|
||||
|
||||
@@ -17,7 +17,7 @@ namespace AyaNova.Models
|
||||
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
public bool Active { get; set; }
|
||||
|
||||
public string Notes { get; set; }
|
||||
public string Wiki { get; set; }
|
||||
public string CustomFields { get; set; }
|
||||
|
||||
@@ -22,7 +22,7 @@ namespace AyaNova.Util
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
private const int DESIRED_SCHEMA_LEVEL = 15;
|
||||
|
||||
internal const long EXPECTED_COLUMN_COUNT = 645;
|
||||
internal const long EXPECTED_COLUMN_COUNT = 644;
|
||||
internal const long EXPECTED_INDEX_COUNT = 178;
|
||||
|
||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||
@@ -879,9 +879,9 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
||||
|
||||
|
||||
//CUSTOMERSERVICEREQUEST
|
||||
await ExecQueryAsync("CREATE TABLE acustomerservicerequest (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null, active bool not null, " +
|
||||
await ExecQueryAsync("CREATE TABLE acustomerservicerequest (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name text not null, " +
|
||||
"notes text, wiki text, customfields text, tags varchar(255) ARRAY, " +
|
||||
"daterequested timestamp not null, customerid bigint not null references acustomer(id), unitid bigint references aunit(id), WorkorderItemId bigint references aworkorderitem(id), " +
|
||||
"daterequested timestamp not null, customerid bigint not null references acustomer(id), unitid bigint references aunit(id), workorderitemid bigint references aworkorderitem(id), " +
|
||||
"requestedbyuserid bigint not null references auser(id), customerreferencenumber text, status integer not null, priority integer not null " +
|
||||
")");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user