This commit is contained in:
@@ -8,7 +8,11 @@ namespace AyaNova.DataList
|
|||||||
public CustomerServiceRequestDataList()
|
public CustomerServiceRequestDataList()
|
||||||
{
|
{
|
||||||
DefaultListObjectType = AyaType.CustomerServiceRequest;
|
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);
|
var RoleSet = BizRoles.GetRoleSet(DefaultListObjectType);
|
||||||
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
AllowedRoles = RoleSet.ReadFullRecord | RoleSet.Change;
|
||||||
|
|
||||||
@@ -18,32 +22,24 @@ namespace AyaNova.DataList
|
|||||||
dynamic cm = null;
|
dynamic cm = null;
|
||||||
|
|
||||||
cm = new JObject();
|
cm = new JObject();
|
||||||
cm.fld = "customerservicerequestname";
|
cm.fld = "Created";
|
||||||
cm.sort = "+";
|
cm.sort = "-";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
cm = new JObject();
|
||||||
cm.fld = "CustomerServiceRequestCustomerServiceRequestOverseerID";
|
cm.fld = "Customer";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
cm = new JObject();
|
||||||
cm.fld = "CustomerServiceRequestDateStarted";
|
cm.fld = "CustomerServiceRequestTitle";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
cm = new JObject();
|
||||||
cm.fld = "CustomerServiceRequestDateCompleted";
|
cm.fld = "CustomerServiceRequestPriority";
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
|
|
||||||
cm = new JObject();
|
cm = new JObject();
|
||||||
cm.fld = "CustomerServiceRequestAccountNumber";
|
cm.fld = "CustomerServiceRequestStatus";
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
cm = new JObject();
|
|
||||||
cm.fld = "customerservicerequestactive";
|
|
||||||
dlistView.Add(cm);
|
|
||||||
|
|
||||||
cm = new JObject();
|
|
||||||
cm.fld = "customerservicerequesttags";
|
|
||||||
dlistView.Add(cm);
|
dlistView.Add(cm);
|
||||||
|
|
||||||
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
DefaultListView = dlistView.ToString(Newtonsoft.Json.Formatting.None);
|
||||||
@@ -54,8 +50,8 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "CustomerServiceRequestName",
|
TKey = "CustomerServiceRequestTitle",
|
||||||
FieldKey = "customerservicerequestname",
|
FieldKey = "CustomerServiceRequestTitle",
|
||||||
AyaObjectType = (int)AyaType.CustomerServiceRequest,
|
AyaObjectType = (int)AyaType.CustomerServiceRequest,
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlIdColumnName = "acustomerservicerequest.id",
|
SqlIdColumnName = "acustomerservicerequest.id",
|
||||||
@@ -65,20 +61,12 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "CustomerServiceRequestNotes",
|
TKey = "CustomerServiceRequestDetails",
|
||||||
FieldKey = "customerservicerequestnotes",
|
FieldKey = "CustomerServiceRequestDetails",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlValueColumnName = "acustomerservicerequest.notes"
|
SqlValueColumnName = "acustomerservicerequest.notes"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
|
||||||
{
|
|
||||||
TKey = "Active",
|
|
||||||
FieldKey = "customerservicerequestactive",
|
|
||||||
UiFieldDataType = (int)UiFieldDataType.Bool,
|
|
||||||
SqlValueColumnName = "acustomerservicerequest.active"
|
|
||||||
});
|
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "Tags",
|
TKey = "Tags",
|
||||||
@@ -87,21 +75,38 @@ namespace AyaNova.DataList
|
|||||||
SqlValueColumnName = "acustomerservicerequest.tags"
|
SqlValueColumnName = "acustomerservicerequest.tags"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//------------
|
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "CustomerServiceRequestAccountNumber",
|
TKey = "Created",
|
||||||
FieldKey = "CustomerServiceRequestAccountNumber",
|
FieldKey = "Created",
|
||||||
UiFieldDataType = (int)UiFieldDataType.Text,
|
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
||||||
SqlValueColumnName = "acustomerservicerequest.accountnumber"
|
SqlValueColumnName = "acustomerservicerequest.daterequested"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
FieldKey = "CustomerServiceRequestCustomerServiceRequestOverseerID",
|
FieldKey = "CustomerServiceRequestItemUnitID",
|
||||||
TKey = "CustomerServiceRequestCustomerServiceRequestOverseerID",
|
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,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
AyaObjectType = (int)AyaType.User,
|
AyaObjectType = (int)AyaType.User,
|
||||||
SqlIdColumnName = "auser.id",
|
SqlIdColumnName = "auser.id",
|
||||||
@@ -110,19 +115,36 @@ namespace AyaNova.DataList
|
|||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "CustomerServiceRequestDateStarted",
|
TKey = "CustomerServiceRequestCustomerReferenceNumber",
|
||||||
FieldKey = "CustomerServiceRequestDateStarted",
|
FieldKey = "CustomerServiceRequestCustomerReferenceNumber",
|
||||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
UiFieldDataType = (int)UiFieldDataType.Text,
|
||||||
SqlValueColumnName = "acustomerservicerequest.datestarted"
|
SqlValueColumnName = "acustomerservicerequest.customerreferencenumber"
|
||||||
});
|
});
|
||||||
|
|
||||||
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
FieldDefinitions.Add(new AyaDataListFieldDefinition
|
||||||
{
|
{
|
||||||
TKey = "CustomerServiceRequestDateCompleted",
|
TKey = "CustomerServiceRequestStatus",
|
||||||
FieldKey = "CustomerServiceRequestDateCompleted",
|
FieldKey = "CustomerServiceRequestStatus",
|
||||||
UiFieldDataType = (int)UiFieldDataType.DateTime,
|
UiFieldDataType = (int)UiFieldDataType.Enum,
|
||||||
SqlValueColumnName = "acustomerservicerequest.datecompleted"
|
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" });
|
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>();
|
List<AyaFormFieldDefinition> l = new List<AyaFormFieldDefinition>();
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestTitle", FieldKey = "CustomerServiceRequestTitle", Hideable = false });
|
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestTitle", FieldKey = "CustomerServiceRequestTitle", Hideable = false });
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "CustomerServiceRequestDetails", FieldKey = "CustomerServiceRequestDetails" });
|
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 = "Tags", FieldKey = "Tags" });
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
|
l.Add(new AyaFormFieldDefinition { TKey = "Wiki", FieldKey = "Wiki" });
|
||||||
l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });
|
l.Add(new AyaFormFieldDefinition { TKey = "Attachments", FieldKey = "Attachments" });
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace AyaNova.Models
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public bool Active { get; set; }
|
|
||||||
public string Notes { get; set; }
|
public string Notes { get; set; }
|
||||||
public string Wiki { get; set; }
|
public string Wiki { get; set; }
|
||||||
public string CustomFields { 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!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
private const int DESIRED_SCHEMA_LEVEL = 15;
|
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;
|
internal const long EXPECTED_INDEX_COUNT = 178;
|
||||||
|
|
||||||
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
|
||||||
@@ -879,9 +879,9 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
|
|||||||
|
|
||||||
|
|
||||||
//CUSTOMERSERVICEREQUEST
|
//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, " +
|
"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 " +
|
"requestedbyuserid bigint not null references auser(id), customerreferencenumber text, status integer not null, priority integer not null " +
|
||||||
")");
|
")");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user