FS 328780 EPOD Server-Side Settings: Difference between revisions
From Calidus HUB
(v0.1 - Initial draft.) |
(v0.2 - Vastly simiplified solution) |
||
Line 4: | Line 4: | ||
{{#vardefine:System|''CALIDUS'' EPOD}} | {{#vardefine:System|''CALIDUS'' EPOD}} | ||
{{#vardefine:Doc_Title|EPOD Server-Side Settings}} | {{#vardefine:Doc_Title|EPOD Server-Side Settings}} | ||
{{#vardefine:Version|0. | {{#vardefine:Version|0.2}} | ||
{{#vardefine:Date| | {{#vardefine:Date|19th August 2015}} | ||
{{#vardefine:Reference|328780}} | {{#vardefine:Reference|328780}} | ||
{{#vardefine:Year|2015}} | {{#vardefine:Year|2015}} | ||
Line 28: | Line 28: | ||
== Solution Overview == | == Solution Overview == | ||
* The mobile device | * The mobile device Style preference will now be maintained in the Site screen in the Admin system, showing only those that are applicable to that system (i.e. hiding all other customers' styles). | ||
* The POD, POC and Service reports available for the customers to configure will now be limited to only those that are applicable to that system. | * The POD, POC and Service reports available for the customers to configure will now be limited to only those that are applicable to that system. | ||
* The mobile device will start with the default OBS style and logo, until the user successfully connects to the server. At this time, the style set on the server will update the style on the device, and the device will refresh. | * The mobile device will start with the default OBS style and logo, until the user successfully connects to the server. At this time, the style set on the server will update the style on the device, and the device will refresh. | ||
== Scope == | == Scope == | ||
Changes will be made to the latest version (3) of {{#var:System}}. | |||
Line 57: | Line 46: | ||
== Data == | == Data == | ||
Create values on EPOD_LISTS for the following items: | |||
* EPL_DELIVERY_POD_FORMAT | |||
* EPL_COLLECTION_POD_FORMAT | |||
* EPL_SERVICE_POD_FORMAT | |||
* PDAStyles | |||
Create values for all lists above as follows: | |||
* EPL_DELIVERY_POD_FORMAT | |||
* EPL_COLLECTION_POD_FORMAT | |||
** Description "Unassigned", no Value isDefault 1 | |||
** Description "Generic" Value="Generic" | |||
** Description "Generic Container" Value="GenContnr" | |||
** Description "CDL Format" Value="CDL_COL" | |||
** Description "SM Fleet" Value="SMFLEET" | |||
** Description "WhiteLine" Value="WHITELINE" | |||
** Description "LFS" Value="LFS" | |||
** Description "LFS (AU/NZ)" Value="LFS_AUNZ" | |||
** Description "Proctor POD" Value="ProctorPOD" | |||
** Description "Proctor STN" Value="ProctorSTN" | |||
** Description "Prolog POD" Value="PrologPOD" | |||
** Description "Eulos POC" Value="EulosPOC" | |||
** Description "Eulos POD" Value="EulosPOD" | |||
** Description "Eulos POC 2" Value="EulosPOC2" | |||
** Description "Pentland" Value="Pentland" | |||
** Description "TDL" Value="TDLPOD" | |||
** Description "Koo" Value="Koo" | |||
** Description "Andrew Porter 1" Value="Porter1" | |||
** Description "Andrew Porter 2" Value="Porter2" | |||
** Description "Bag it Up" Value="BIU" | |||
** Description "Brett Martin" Value="BRM" | |||
** Description "Hewicks POC" Value="HewicksPOC" | |||
** Description "Hewicks POD/POC" Value="HewPODPOC" | |||
** Description "Cooper Callas POD" Value="Cooper-POD" | |||
** Description "Cooper Callas POC" Value="Cooper-POC" | |||
* EPL_SERVICE_POD_FORMAT | |||
** Description "Unassigned", no Value, isDefault 1. | |||
** Description "SM Fleet" Value "SMFLEET" | |||
** Description "ALS" Value "ALS" | |||
** Description "Lanemark" Value "Lanemark" | |||
* PDAStyles | |||
** Description "Default OBS Styling" Value "" isDefault 1 | |||
** Description "Red" Value "RED" | |||
** Description "Green" Value "GREEN" | |||
** Description "Partnerlink" Value "PLINK" | |||
** Description "Lanemark" Value "LANE" | |||
** Description "Bag It Up" Value "BIU" | |||
** Description "Brett Martin" Value "BRETT" | |||
** Description "LFS" Value "LFS" | |||
** Description "Andrew Porter" Value "AP" | |||
** Description "NHSBT" Value "NHSBT" | |||
** Description "Greene King" Value "GK" | |||
** Description "Proctors" Value "PROC" | |||
** Description "Matrix" Value "MATRIX" | |||
** Description "Fowler Welch" Value "FOWLER" | |||
** Description "Cooper Callas" Value "COO" | |||
** Description "Manheim" Value "MANHEIM" | |||
{{Note}} the | {{Note}} For each implementation of the system, these values will be modified so that only the values relevant to that implementation are present, so that the customer using the system has no visibility of other customers' styles or formats. | ||
Line 72: | Line 111: | ||
== Database/DAL == | == Database/DAL == | ||
Table EPOD_SITE requires the following modifications: | Table EPOD_SITE requires the following modifications: | ||
* EPL_PDA_STYLE_ID [nvarchar](10) NOT NULL | * EPL_PDA_STYLE_ID [nvarchar](10) NOT NULL | ||
Existing packages will be modified to allow the creating, editing and selecting of the new field, including but not limited to: | |||
Existing packages will be modified to allow the creating, editing and selecting of the new | |||
* EPOD_SITE_INSERT | * EPOD_SITE_INSERT | ||
* EPOD_SITE_SELECT | * EPOD_SITE_SELECT | ||
Line 193: | Line 119: | ||
* EPOD_SITE_UPDATE | * EPOD_SITE_UPDATE | ||
The existing EPOD_SITE DAL object will be changed to: | The existing EPOD_SITE DAL object will be changed to: | ||
* Read the new | * Read the new field. {{Note}} It is not necessary to add the field as search-able items. | ||
* Export the new | * Export the new field as XML. | ||
A new Database package GetListItemsByVal will be created to allow list items to be selected by type and value. | |||
CREATE Procedure [dbo].[GetListItemsByVal] | |||
@ListName varchar(30), | |||
@ItemValue varchar(20) | |||
as | |||
Select I.Description,I.Value,IsDefault from EPOD_LISTS L | |||
inner join EPOD_LIST_ITEMS I on I.ListID=L.ListID | |||
Where L.ListName=@ListName And L.Value=@ItemValue | |||
=== Webservices === | |||
The adding of PDA_Style_ID to the Site section of the login response will be handled by the changes being made to the DAL object shown above. | |||
== Admin == | == Admin == | ||
=== Job Groups === | === Job Groups === | ||
[[File:FS_328780_Job_Group_Maint1.PNG|border|600px]] | [[File:FS_328780_Job_Group_Maint1.PNG|border|600px]] | ||
POD Report description in table to be | The changes are: | ||
* To implement lists for POD/POC/Service report | |||
* POD/POC/Service Report description in the table to be looked up from the list | |||
All drop-down list values should not be hard-coded, but set and maintained through the EPOD Lists configuration (through tables EPOD_LIST_ITEMS and EPOD_LISTS in the database). | All drop-down list values should not be hard-coded, but set and maintained through the EPOD Lists configuration (through tables EPOD_LIST_ITEMS and EPOD_LISTS in the database). See the Data section of this document for this configuration. | ||
Remove all asp:ListItem tags from the asp:DropDownList tags in job_group.aspx for the affected fields: | |||
* EPL_DELIVERY_POD_FORMAT | |||
* EPL_COLLECTION_POD_FORMAT | |||
* EPL_SERVICE_POD_FORMAT | |||
On Page_Load, a call should be made to populate the drop-down lists in the pop-up entry/amend screen, for the following field IDs: | |||
* EPL_DELIVERY_POD_FORMAT | |||
* EPL_COLLECTION_POD_FORMAT | |||
* EPL_SERVICE_POD_FORMAT | |||
An example is as follows: | |||
EPODUtils.LoadDDL(this.EPL_DELIVERY_POD_FORMAT, "EPL_DELIVERY_POD_FORMAT", EPOD_DBCONNECTION, null); | |||
The text on the table for the report types is translated via the existing function TranslateReportType. An example of this call is as follows: | |||
TranslateReportType(Eval("EPL_SERVICE_POD_FORMAT").ToString()) | |||
This function (in job_group.aspx.cs) will be changed to receive the parameters differently. | |||
The declaration of the new function will be as follows: | |||
public string TranslateReportType(String Type, String Report) | |||
The parameters are as follows: | |||
* String Type will now be the report type being looked up, one of: | |||
** "EPL_DELIVERY_POD_FORMAT" | |||
** "EPL_COLLECTION_POD_FORMAT" | |||
** "EPL_SERVICE_POD_FORMAT" | |||
* String Report will be the value from the data e.g. Eval("EPL_SERVICE_POD_FORMAT").ToString(). | |||
The final call will be as per the following example: | |||
TranslateReportType("EPL_SERVICE_POD_FORMAT", Eval("EPL_SERVICE_POD_FORMAT").ToString()) | |||
The function will call a new function in EPOD_UTILS called GetListItemsByVal | |||
public static DataTable GetListItemsByVal(string sListName, string sItemValue, EPOD_DBCONNECTION EPOD_DBCONNECTION) | |||
{ | |||
DataTable dt = new DataTable(); | |||
EPOD_DBCONNECTION.Connect(); | |||
try | |||
{ | |||
using (DbCommand cmd = EPOD_DBCONNECTION.GetDbCommand()) | |||
{ | |||
cmd.CommandType = CommandType.StoredProcedure; | |||
cmd.CommandText = "GetListItemsByVal"; | |||
cmd.Connection = EPOD_DBCONNECTION.DBConnection; | |||
DbParameter pListName = EPOD_DBCONNECTION.GetDbParameter(cmd); | |||
pListName.ParameterName = EPOD_DBCONNECTION.getDBParamPrefix() + "ListName"; | |||
pListName.DbType = DbType.String; | |||
pListName.Value = sListName; | |||
cmd.Parameters.Add(pListName); | |||
DbParameter pItemValue = EPOD_DBCONNECTION.GetDbParameter(cmd); | |||
pItemValue.ParameterName = EPOD_DBCONNECTION.getDBParamPrefix() + "ItemValue"; | |||
pItemValue.DbType = DbType.String; | |||
pItemValue.Value = sItemValue; | |||
cmd.Parameters.Add(pItemValue); | |||
dt = EPOD_DBCONNECTION.SelectDataTable(cmd); | |||
} | |||
} | |||
finally | |||
{ | |||
EPOD_DBCONNECTION.Disconnect(); | |||
} | |||
return dt; | |||
} | |||
The calling function will then return the matching value. If none is found, the function will return "Unassigned". | |||
=== Site === | |||
[[File:FS_328780_Site_Maint2.PNG|border|600px]] | |||
The changes are: | |||
* To implement lists for POD/POC/Service report | |||
All drop-down list values should not be hard-coded, but set and maintained through the EPOD Lists configuration (through tables EPOD_LIST_ITEMS and EPOD_LISTS in the database). See the Data section of this document for this configuration. | |||
Remove all asp:ListItem tags from the asp:DropDownList tags in site_header.aspx for the affected fields: | |||
* EPL_DELIVERY_POD_FORMAT | |||
* EPL_COLLECTION_POD_FORMAT | |||
* EPL_SERVICE_POD_FORMAT | |||
On Page_Load, a call should be made to populate the drop-down lists in the pop-up entry/amend screen, for the following field IDs: | |||
* EPL_DELIVERY_POD_FORMAT | |||
* EPL_COLLECTION_POD_FORMAT | |||
* EPL_SERVICE_POD_FORMAT | |||
An example is as follows: | |||
EPODUtils.LoadDDL(this.EPL_DELIVERY_POD_FORMAT, "EPL_DELIVERY_POD_FORMAT", EPOD_DBCONNECTION, null); | |||
The | The text on the table for the report types is translated via the existing function TranslateReportType. An example of this call is as follows: | ||
TranslateReportType(Eval("EPL_SERVICE_POD_FORMAT").ToString()) | |||
This function (in site_header.aspx.cs) will be changed to receive the parameters differently. | |||
The declaration of the new function will be as follows: | |||
public string TranslateReportType(String Type, String Report) | |||
The parameters are as follows: | |||
* String Type will now be the report type being looked up, one of: | |||
** "EPL_DELIVERY_POD_FORMAT" | |||
** "EPL_COLLECTION_POD_FORMAT" | |||
** "EPL_SERVICE_POD_FORMAT" | |||
* String Report will be the value from the data e.g. Eval("EPL_SERVICE_POD_FORMAT").ToString(). | |||
The final call will be as per the following example: | |||
TranslateReportType("EPL_SERVICE_POD_FORMAT", Eval("EPL_SERVICE_POD_FORMAT").ToString()) | |||
The function will call a new function in EPOD_UTILS called GetListItemsByVal (defined above), and will then return the matching value. If none is found, the function will return "Unassigned". | |||
A new field will be added to the PDA tab, for maintenance of the PDA Style: | |||
[[File:FS_328780_Site_Maint1.PNG|border|600px]] | |||
[[File: | |||
This will be a drop-down list item and will be labelled as "PDA Style". | |||
The item will be created as <asp:DropDownList ID="ddlEPL_PDA_STYLE_ID" ..>. | |||
The item will be populated with values at Page_Load, as follows: | |||
EPODUtils.LoadDDL(this.ddlEPL_PDA_STYLE_ID, "PDAStyles", EPOD_DBCONNECTION, null); | |||
The value of this DDL will be saved when the save button is clicked (through the event saveBTN_Clicked): | |||
The | EPOD_SITE.EPL_PDA_STYLE_ID = ddlEPL_PDA_STYLE_ID.SelectedValue; | ||
Line 366: | Line 276: | ||
=== Database/DAL === | === Database/DAL === | ||
Add new | Add new field to EPOD_SITE (PDA_Style_ID) | ||
This should be achieved as follows: | This should be achieved as follows: | ||
Line 373: | Line 283: | ||
Change the definition of the EPOD_SITE table in function CreateDB to add new fields to the end of the table: | Change the definition of the EPOD_SITE table in function CreateDB to add new fields to the end of the table: | ||
* EPL_PDA_STYLE_ID nvarchar(10) NOT NULL DEFAULT \'\' | * EPL_PDA_STYLE_ID nvarchar(10) NOT NULL DEFAULT \'\' | ||
Change the last version changed in function InstallDB to the build number of this change (set in \TiApp.xml). | Change the last version changed in function InstallDB to the build number of this change (set in \TiApp.xml). | ||
Line 384: | Line 292: | ||
New fields: | New fields: | ||
* EPL_PDA_STYLE_ID | * EPL_PDA_STYLE_ID | ||
Line 400: | Line 306: | ||
** Add the new fields as parameters to the function. | ** Add the new fields as parameters to the function. | ||
** Add the new fields to the database update SQL and parameters. | ** Add the new fields to the database update SQL and parameters. | ||
* function InsertAllPDASites | * function InsertAllPDASites | ||
** Change the sample comment to show the new fields | ** Change the sample comment to show the new fields | ||
** Add the new fields as parameters to the call to InsertPDASite (through a call to the GetXMLItem function). | ** Add the new fields as parameters to the call to InsertPDASite (through a call to the GetXMLItem function). | ||
* function InsertAllPDASitesJSON | * function InsertAllPDASitesJSON | ||
** Change the sample comment to show the new fields | ** Change the sample comment to show the new fields | ||
** Add the new fields as parameters to the call to InsertPDASite (through a call to the GetJSONItem function). | ** Add the new fields as parameters to the call to InsertPDASite (through a call to the GetJSONItem function). | ||
Line 418: | Line 321: | ||
;\Resources\ui\common\Login.js | ;\Resources\ui\common\Login.js | ||
After the object Ti.App.PDA_SITE has been loaded, check the settings of the new fields and action as follows: | After the object Ti.App.PDA_SITE has been loaded, check the settings of the new fields and action as follows: | ||
* Set Ti.App.style._style to the value in EPL_PDA_STYLE_ID. | |||
* Set Ti.App.style._style to the value in EPL_PDA_STYLE_ID | |||
=== Preferences === | === Preferences === | ||
Remove | Remove the Style preference from the mobile device preferences. | ||
This should be achieved as follows: | This should be achieved as follows: | ||
;\platform\android\res\values\array.xml | ;\platform\android\res\values\array.xml | ||
:Remove | :Remove the styleNames string-array. | ||
;\platform\android\res\xml\preferences.xml | ;\platform\android\res\xml\preferences.xml | ||
:Remove | :Remove the STYLE ListPreference. | ||
=== Logon === | === Logon === | ||
All changes relating to receiving Settings and Styles in the logon response message are handled by the PDA_SITE changes specified above. | All changes relating to receiving Settings and Styles in the logon response message are handled by the PDA_SITE changes specified above. | ||
All changes to | All changes to set the style ID on the device from the parsed data received are handled by the PDA_SITE changes specified above. | ||
Store the original value of the style ID field from the site before processing. If the value has changed after loading the Site, refresh the Login display, by calling Ti.App.style.restyleItemsEx(win, true); | |||
Store the original value of the | |||
Line 481: | Line 364: | ||
{{TestPlan_CycleHeader | {{TestPlan_CycleHeader | ||
|Cycle={{ #vardefineecho: Cycle | {{ #expr: {{ #var: Cycle }} + 1 }} }}{{ #vardefine: SubCycle | {{ #var: Cycle }} }} | |Cycle={{ #vardefineecho: Cycle | {{ #expr: {{ #var: Cycle }} + 1 }} }}{{ #vardefine: SubCycle | {{ #var: Cycle }} }} | ||
|Title= | |Title=Admin | ||
|Notes= | |Notes= | ||
}} <!--INSERT TESTS HERE --> {{TestPlan_Test | }} <!--INSERT TESTS HERE --> {{TestPlan_Test | ||
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | |Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | ||
|Action=The | |Action=Find Job Groups | ||
|Result=The | |Result=POD/POC/Service report formats are displayed correctly in the grid | ||
|Remarks= | |||
|PassFail= | |||
}} {{TestPlan_Test | |||
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | |||
|Action=Edit a Job Group. | |||
|Result=POD/POC/Service report formats are displayed correctly in the pop-up screen | |||
|Remarks= | |||
|PassFail= | |||
}} {{TestPlan_Test | |||
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | |||
|Action=Change a POD, POC and Service format. | |||
|Result=Only the values set up in the lists are visible or selectable in the drop-down lists. The values are saved correctly. | |||
|Remarks= | |||
|PassFail= | |||
}} {{TestPlan_Test | |||
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | |||
|Action=Open the Site screen | |||
|Result=POD/POC/Service report formats are displayed correctly in the screen | |||
|Remarks= | |||
|PassFail= | |||
}} {{TestPlan_Test | |||
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | |||
|Action=Edit a site | |||
|Result=PDA Style is present and selectable. Only the values set up in the lists are visible or selectable in the drop-down lists for POD, POC, Service and PDA Style. The values are saved correctly. | |||
|Remarks= | |||
|PassFail= | |||
}} {{TestPlan_CycleFooter}} | |||
{{TestPlan_CycleHeader | |||
|Cycle={{ #vardefineecho: Cycle | {{ #expr: {{ #var: Cycle }} + 1 }} }}{{ #vardefine: SubCycle | {{ #var: Cycle }} }} | |||
|Title=Mobile Device | |||
|Notes=Ensure the site is set up with the default style | |||
}} <!--INSERT TESTS HERE --> }} {{TestPlan_Test | |||
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | |||
|Action=Start the application. Select Preferences. | |||
|Result=No Style is displayed. | |||
|Remarks= | |Remarks= | ||
|PassFail= | |PassFail= | ||
}} {{TestPlan_Test | }} {{TestPlan_Test | ||
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | |Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | ||
|Action= | |Action=Exit preferences. | ||
|Result=The | |Result=Data uploads from the site. The device displays in the default style. | ||
|Remarks= | |Remarks= | ||
|PassFail= | |PassFail= | ||
}} {{TestPlan_Test | }} {{TestPlan_Test | ||
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | |Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }} | ||
|Action= | |Action=Exit the device application. Change the style server side to a client style. Log on. | ||
|Result=The | |Result=The device displays in the client style. | ||
|Remarks= | |Remarks= | ||
|PassFail= | |PassFail= | ||
Line 513: | Line 431: | ||
|REQ=0 | |REQ=0 | ||
|EST=0 | |EST=0 | ||
|FS=2. | |FS=2.0 | ||
|TS=0 | |TS=0 | ||
|DEV= | |DEV=6 | ||
|ST= | |ST=1.75 | ||
|IMP=1 | |IMP=1 | ||
|PM= | |PM=0.5 | ||
|Client={{#var:Client}} | |Client={{#var:Client}} | ||
|Year={{#var:Year}} | |Year={{#var:Year}} |