FS 328780 EPOD Server-Side Settings: Difference between revisions

From Calidus HUB
(v0.1 - Initial draft.)
 
m (Minor formatting changes)
 
(One intermediate revision by the same user not shown)
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.1}}
{{#vardefine:Version|0.2}}
{{#vardefine:Date|24th July 2015}}
{{#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 preferences will now be maintained in a new screen in the Admin system.
* 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 style and preferences can now be selected against the Site, 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.
* The Logo displayed on the device will come from the logo set against the Site on the server.
* The mobile device application's preferences will now only contain Site and Webservice, removing the ability for the customer to change settings that adversely affect the running of the app.
* When the user logs on to the device, the device will inform the user if the version of the app they are running is unsuitable for that system. This will work with all versions of the system (1.X, 2.X, 3.X) and can be released with a small server update, rather than a device update.
* As an additional change in version 3 onwards, a required update of the mobile device application will not allow the user to continue without first updating the app.
Benefits:
* Most changes to Style can now be achieved without mobile device application modifications.
* Changes to preferences can now be achieved on the server instead on manual entry/scanning a QR code, although setting of Style and Webservice manually and all settings through a QR code will still be supported for those operations that do not set up Preferences through the server. Note that this will no longer allow a customer style to be selected - this must be through the server settings after this development is complete.
* The application will be a little smaller (around 300k), potentially improving memory usage on devices.




== Scope  ==
== Scope  ==
This solution requires changes to version 1 and the latest version (version 3) of {{#var:System}}. This has been made clear in the sections below. Unless specified, changes apply solely to the latest version of the system.
Changes will be made to the latest version (3) of {{#var:System}}.




Line 57: Line 46:


== Data  ==
== Data  ==
{{Warning}}
Create values on EPOD_LISTS for the following items:
Metadata setup per customer - Admin Lists
* EPL_DELIVERY_POD_FORMAT
 
* EPL_COLLECTION_POD_FORMAT
Metadata setup per customer - PDA Styles and Settings
* EPL_SERVICE_POD_FORMAT
* PDAStyles


{{Note}} the Logo styles should point to the altLogo.jpg file in the Images directory, identified through the property Ti.Filesystem.applicationDataDirectory.
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"


Set up UpdatesInfo.xml with new Max Version priority
{{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 ==
Add new table PDA_PREFERENCE.
CREATE TABLE [dbo].[EPOD_PDA_PREFERENCE](
    [EPP_ID] [int] IDENTITY(1,1) NOT NULL,
    [EPP_DESCRIPTION] [varchar](50) NOT NULL,
    [EPP_DEBUG] [varchar](1) NOT NULL,
    [EPP_WSINTERVAL] [int] NOT NULL,
    [EPP_UPINTERVAL] [int] NOT NULL,
    [EPP_GEOTAG] [varchar](1) NOT NULL,
    [EPP_GEOMSGINTERVAL] [int] NOT NULL,
    [EPP_OBSALERT] [varchar](50) NOT NULL,
    [EPP_OBSVIBRATE] [int] NOT NULL,
    [EPP_OBSIMAGESIZE] [int] NOT NULL,
    [EPP_OBSIMAGECOMPRESSION] [float] NOT NULL,
    [EPP_DEBUGMODE] [varchar](1) NOT NULL,
    [EPP_LANGUAGE] [varchar](10) NOT NULL,
    [EPP_LAST_CHANGED_DATE] [int] NOT NULL,
    [EPP_LAST_CHANGED_TIME] [int] NOT NULL,
CONSTRAINT [PK_EPOD_PDA_PREFERENCE] PRIMARY KEY CLUSTERED
(
    [EPP_ID] ASC
)WITH (PAD_INDEX  = OFF,
        STATISTICS_NORECOMPUTE  = OFF,
        IGNORE_DUP_KEY = OFF,
        ALLOW_ROW_LOCKS  = ON,
        ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
Add new table PDA_STYLE.
CREATE TABLE [dbo].[EPOD_PDA_STYLE](
    [EPS_STYLE_ID] [varchar](10) NOT NULL,
    [EPS_DESCRIPTION] [varchar](50) NOT NULL,
    [EPS_STYLE] [varchar](max) NOT NULL,
CONSTRAINT [PK_EPOD_PDA_STYLE] PRIMARY KEY CLUSTERED
(
    [EPS_STYLE_ID] ASC
)WITH (PAD_INDEX  = OFF,
        STATISTICS_NORECOMPUTE  = OFF,
        IGNORE_DUP_KEY = OFF,
        ALLOW_ROW_LOCKS  = ON,
        ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
A new DAL object will be created for the EPOD_PDA_PREFERENCE table, from source code EPOD_PDA_PREFERENCE.cs. This will be created following the standards of all other DAL objects in the server.
This will be used by the new Admin screen to retrieve, edit, update and add records. As such it will consist of:
* Private properties for
** The database connection
** The fields on the database tables
** Existence of the record.
** Last Updated date/time
*Public properties for
** Setting and Getting the private properties
** Constructors for creating the object from an ID (to find the record if it exists), or from all fields passed in (to create a new record)
** Public methods to
** Update
** Delete
** GetPDAPreferences
** ToXElement - to return the value of the private toJSON method as a single EPL_PDA_PREFERENCE XML tag.
* Private methods for
** Getting parameters
** Getting parameters for insert
** Getting parameters for select - {{Note}} It is only necessary to select against the ID or the description - no other fields need be added to this.
** toJSON - to encapsulate the values in fields other than EPP_ID, EPP_DESCRIPTION, EPP_LAST_CHANGED_DATE and EPP_LAST_CHANGED_TIME into a JSON object similar to the following example:
    {
        "WSINTERVAL":"60",
        "UPINTERVAL":"300",
        "GEOMSGINTERVAL":"0",
        "OBSALERT":"content://media/internal/audio/media/34",
        "GEOTAG":true,
        "OBSIMAGESIZE":"1",
        "OBSIMAGECOMPRESSION":"0.3"
        "DEBUG" : true,
        "OBSVIBRATE" : "1",
        "DEBUGMODE" : false,
        "LANGUAGE" : "en"
    }
Properties expected to be boolean (true or false) will be set to true if their value is "Y", else false.
All other properties and all property names will be treated as strings (i.e. encapsulated in quotes).
This DAL object will be supported by database packages:
* EPOD_PDA_PREFERENCE_SELECT - {{Note}} It is only necessary to select against the ID or the description - no other fields need be added to this.
* EPOD_PDA_PREFERENCE_DELETE
* EPOD_PDA_PREFERENCE_UPDATE
{{Note}} It is not necessary to add procedures or packages for exporting to XML, as this table is not intended to be exported itself, but rather part of the existing EPOD_SITE XML Export.
A new DAL object will be created for the EPOD_PDA_STYLE table, from source code EPOD_PDA_STYLE.cs. This will be created following the standards of all other DAL objects in the server.
This will be used by the new Admin screen to retrieve, edit, update and add records. As such it will consist of:
* Private properties for
** The database connection
** The fields on the database tables
** Existence of the record.
** Last Updated date/time
*Public properties for
** Setting and Getting the private properties
** Constructors for creating the object from an ID (to find the record if it exists), or from all fields passed in (to create a new record)
** Public methods to
** Update
** Delete
** GetPDAPreferences
* Private methods for
** Getting parameters
** Getting parameters for insert
** Getting parameters for select - {{Note}} It is only necessary to select against the ID or the description - no other fields need be added to this.
This will be supported by database packages:
* EPOD_PDA_STYLE_SELECT - {{Note}} It is only necessary to select against the ID or the description - no other fields need be added to this.
* EPOD_PDA_STYLE_DELETE
* EPOD_PDA_STYLE_UPDATE
{{Note}} It is not necessary to add procedures or packages for exporting to XML, as this table is not intended to be exported itself, but rather part of the existing EPOD_SITE XML Export.
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
* EPL_PDA_PREF_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 flag, including but not limited to:
* 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 fields. {{Note}} It is not necessary to add these fields as search-able items.
* Read the new field. {{Note}} It is not necessary to add the field as search-able items.
* Export the new fields as XML.
* Export the new field as XML.


The existing ToXElement method of this DAL object must be modified to export the EPL_PDA_PREFERENCE and EPL_PDA_STYLE tags. This data is retrieved from the new tables, if the appropriate ID is set against the site. The Style and Preference may be retrieved through the use of the new DAL objects at the point of building the XML, or by optionally linking to the new tables in the EPOD_SITE_SELECT* packages, whichever is more efficient. In the latter case, the building of the JSON element within the EPL_PDA_PREFERENCE tag must then be incorporated here rather than in the EPOD_PDA_PREFERENCE DAL object.


The value in EPL_LOGO must also be exported, but only if the data and time on the request for data (i.e. the LOGIN_REQUEST) is before the last changed date and time. To achieve this, the ToXElement and GetSitesXML methods must be overloaded with versions that receive a ClientLastUpdated DateTime parameter. Method ToXElement will then check this date against the Last Updated Date and Time to decide whether the Logo should be populated. This should be passed through from the calling function GetUpdatedData from MessageProcess.ProcessLogonRequest.
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 ===
=== Webservices ===
{{Note}} To be completed in version 1 and 3 of the {{#var:System}} server.
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.
 
;\WebServices\Calidus_ePOD\PDAUpdates\UpdatesInfo.xml
Ensure the contents of this proforma file is updated to add the new maxversion attribute, as follows:
 
    <?xml version="1.0" encoding="utf-8" ?>
    <UPDATES>
      <EPOD_CLIENT version="1.30.0.0"
      url="http://www.calidus-web.com:9093/EPOD/WebServices/Calidus_ePOD/PDAUpdates/EPODClientInstaller.CAB"
      required="Y" />
      <EPOD_CLIENT_ANDROID version="3.00.02.7" maxversion="3.99.99.99"
      url="http://www.calidus-web.com:9093/EPOD/WebServices/Calidus_ePOD/PDAUpdates/CALIDUSePODv3.apk"
      required="Y" />
      <EPOD_UPDATER version="1.26.2.0"
      url="http://www.calidus-web.com:9093/EPOD/WebServices/Calidus_ePOD/PDAUpdates/ePODUpdaterInstall.CAB"
      required="Y" />
    </UPDATES>
 
 
;\Data Classes\MessageProcess.ProcessLogonRequest
Implement 'Max Version Check' in Login Request
The Versions Data checks here must be modified to retrieve the EPOD_CLIENT_ANDROID information from the incoming LOGON_REQUEST and compare it to the values held in the UpdatesInfo.xml file - this will require a modification to the EPOD_UTILS.getVersionXML method to compare the Android versions (copying the code almost verbatim from the existing code). This code must also check the versions against the potential maxversion parameter held against the tags in UpdatesInfo.xml. In the case where the value of the version in the message exceeds the value of the version in the xml file, the function must return an error code to the calling function, which must then check this returned data and return a logon error in a similar way to an invalid user:
    if (!pda_user.DBExists)
        return new XDocument(new XDeclaration("1.0", "utf-8", "yes"),
                            new XElement("LOGON_RESPONSE",
                                new XAttribute("ID", Message.Attribute("ID").Value),
                                new XElement("RESULT", "NAK"),
                                new XElement("ERROR", "INVALID VERSION OF THE APPLICATION - MAX VERSION IS XXX")));
The maximum version should be inserted at the appropriate place in the message.
 
 
The adding of Logo, PDA_Style_ID, PDA_Style and PDA_Pref to the Site section of the login response will be handled by the changes being made to the DAL object above.
 
 
 
 
 
 
 
 




== Admin ==
== Admin ==
=== Job Groups ===
=== Job Groups ===
{{Warning}}
[[File:FS_328780_Job_Group_Maint1.PNG|border|600px]]
[[File:FS_328780_Job_Group_Maint1.PNG|border|600px]]
implement lists for POD/POC/Service report
POD Report description in table to be as set up in 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).
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). See the Data section of this document for this configuration.


=== Site ===
Remove all asp:ListItem tags from the asp:DropDownList tags in job_group.aspx for the affected fields:
{{Warning}}
* EPL_DELIVERY_POD_FORMAT
* EPL_COLLECTION_POD_FORMAT
* EPL_SERVICE_POD_FORMAT


[[File:FS_328780_Site_Maint1.PNG|border|600px]]
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);


implement lists for POD/POC/Service report


POD Report description in table to be as set up in list
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())


Add DDL settings of Style and Preference IDs (using definable lists)
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())


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).
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);




=== PDA System Settings ===
The text on the table for the report types is translated via the existing function TranslateReportType. An example of this call is as follows:
Add a new PDA System Settings Maintenance screen, and add to the Administration menu.
TranslateReportType(Eval("EPL_SERVICE_POD_FORMAT").ToString())


The PDA Settings screen should be added to the ''Administration'' menu.
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())


[[File:FS_328780_PDA_Menu.PNG|border|600px]]
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".
<br />''Administration Menu, showing the new PDA Settings screen''<br />


The PDA Settings screen should be created following the standards of all Admin screens.


There should be a '''Find''' button, displaying a Find section. This should allow searching by Description only.
A new field will be added to the PDA tab, for maintenance of the PDA Style:


There should be a '''New''' button, which will display the pop-up Add screen, described in more detail below.
[[File:FS_328780_Site_Maint1.PNG|border|600px]]
 
[[File:FS_328780_PDA_Settings1.PNG|border|600px]]
<br />''PDA Settings screen''<br />
 
On clicking '''Search''', all records matching the selection should be displayed in a table below.
 
Each line should allow clicking of a '''Select''' button, to show an Edit pop-up screen.
This screen is also accessible through pressing the '''New''' button on the top bar.
 
[[File:FS_328780_PDA_Settings2.PNG|border|600px]]
<br />''PDA Settings Add/Edit pop-up screen''<br />
 
 
The screen will display:
* Description
*  [EPP_DEBUG] [varchar](1) NOT NULL,
*  "Sending Message Interval", hint help "The amount of time between checks for pending data to be sent to the server.", linked to EPP_WSINTERVAL, a drop-down list of values:
** "30 Seconds", set as value "30"
** "60 Seconds", set as value "60", the default value
** "90 Seconds", set as value "90"
** "2 Minutes", set as value "120"
** "5 Minutes", set as value "300"
** "10 Minutes", set as value "600"
*  "Auto-Update Interval", hint help "The amount of time between checks whether your assigned load has been updated by admin staff.", linked to EPP_UPINTERVAL, a drop-down list of values:
** "30 Seconds", set as value "30"
** "60 Seconds", set as value "60"
** "90 Seconds", set as value "90"
** "2 Minutes", set as value "120"
** "5 Minutes", set as value "300", the default value
** "10 Minutes", set as value "600"
*  "Geo-tag Messages", hint help "Enabled - Messages sent back to the server are tagged with GPS co-ordinates.", linked to EPP_GEOTAG, a check-box, defaulting to Checked.
*  "Geo-tracking Messages", hint help "Whether and how often GPS tracking messages should be sent back to the server. Note that this will leave the GPS unit enabled and may drain the battery.", linked to EPP_GEOMSGINTERVAL, a drop-down list of values:
** "Disabled", set as value "0", the default value.
** "1 Minute", set as value "60"
** "2 Minutes", set as value "120"
** "5 Minutes", set as value "300"
** "10 Minutes", set as value "600"
*  "Alert Tone", hint help "The sound made on a critical alert.", linked to EPP_OBSALERT, a freely-keyed text value.
*  "Vibrate Mode", hint help "Indicates whether critical alerts vibrate the device.", linked to EPP_OBSVIBRATE, a drop-down list of values:
**  "Off", set as value "0"
** "Short", set as value "1"
** "Long", set as value "2"
** "Intermittent", set as value "3", the default value
*  "Debug mode", hint help "Enabled - Additional options will be shown, to view and email errors.", linked to EPP_DEBUGMODE, a check-box, defaulting to unchecked.
*  "Language", hint help "The language used by the application", linked to EPP_LANGUAGE, a drop-down list of values.
 
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).
 
The allowed list of values for "Language" are the two-character ISO 639-1 codes. At this time, only "en" (English) and zh (Chinese) have language files, and only English is fully available. Although this should be added as a drop-down list, the only applicable language at this time is "en", which is what should be defaulted here.
 
If this screen is called from the '''Select''' button against a line, all values from that configuration will be pre-loaded in the entry fields, all fields will be disabled, and '''Edit''' and '''Delete''' buttons will be provided on the title bar.
 
If this screen is called from the '''New''' button against a line, all values will be set the the default values, and a'''Save''' button will be provided on the title bar.


A '''Close''' button will be provided in all instances, to allow the user to close the pop-up screen. If any changes have been made whilst in the screen, the user will be prompted if they wish to discard their changes, and the pop-up screen will only exit if confirmed by the user.


If the '''Edit''' button is clicked, all fields will be enabled, and the '''Edit''' button will be replaced with a '''Save''' and '''Cancel''' button.
This will be a drop-down list item and will be labelled as "PDA Style".


If the '''Cancel''' button is pressed, any changes the user has made will be discarded.
The item will be created as <asp:DropDownList ID="ddlEPL_PDA_STYLE_ID" ..>.


If the '''Save''' button is pressed, any changes made by the user will be saved, and the table redisplayed to show the additional record.
The item will be populated with values at Page_Load, as follows:
EPODUtils.LoadDDL(this.ddlEPL_PDA_STYLE_ID, "PDAStyles", EPOD_DBCONNECTION, null);


If the '''Delete''' button is pressed, the user will be asked to confirm if they want to delete. If they do not, the pop-up screen will remain open. If they confirm they are sure, the record will be deleted and the table redisplayed to show the remaining records.
The value of this DDL will be saved when the save button is clicked (through the event saveBTN_Clicked):
 
EPOD_SITE.EPL_PDA_STYLE_ID =  ddlEPL_PDA_STYLE_ID.SelectedValue;
 
The following fields will not have an ability to have these settings changed, and will default as follows:
*  [EPP_OBSIMAGESIZE] - 1
*  [EPP_OBSIMAGECOMPRESSION] - 0.3
These will be set when creating a new record.




Line 366: Line 278:


=== Database/DAL ===
=== Database/DAL ===
Add new fields to EPOD_SITE (PDA_Style_ID, PDA_Style, PDA_Pref)
Add new field to EPOD_SITE (PDA_Style_ID)


This should be achieved as follows:
This should be achieved as follows:
Line 373: Line 285:
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 \'\'
* EPL_PDA_STYLE ntext NULL
* EPL_PDA_PREFERENCE ntext NULL


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 294:
New fields:
New fields:
* EPL_PDA_STYLE_ID
* EPL_PDA_STYLE_ID
* EPL_PDA_STYLE
* EPL_PDA_PREFERENCE




Line 400: Line 308:
** 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.
** If EPL_LOGO contains data, convert the logo to an image (using Ti.Utils.base64decode) and store this in the application's data directory, using Ti.Fileystem.getFile(Ti.Filesystem.applicationDataDirectory, 'altLogo.jpg').write().
* 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).
** Ensure EPL_LOGO is passed from the incoming XML.
* 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).
** Ensure EPL_LOGO is passed from the incoming JSON.




Line 418: Line 323:
;\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.configItems to be the resulting object of parsing the value in EPL_PDA_STYLE as JSON.
* 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. {{Note}} Encapsulate this code in try/catch objects - any errors should set the values above back to their defaults:
** Ti.App.style._style - ''
** Ti.App.style.configItems - {}
* Parse the value in EPL_PDA_PREF and set the system properties from the values contained in the resulting object. This code can be copied from \Resources\ui\common\Config.js, from the successful callback of scanning a QR barcode (Ti.App.Barcode.success).




=== Preferences ===
=== Preferences ===
Remove all preferences except Site and Webservice from the mobile device preferences.
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 all entries
:Remove the styleNames string-array.
 


;\platform\android\res\xml\preferences.xml
;\platform\android\res\xml\preferences.xml
:Remove all entries except the first 2 (SITEID and WEBSERVICE)
:Remove the STYLE ListPreference.




=== Logon ===
=== Logon ===
Change Required version check to force exit the app after issuing the error
;\Resources\System\WebServices.js
Change functions ProcessJSONLoginResponse and ProcessLoginResponse, when checking the EPOD_CLIENT_VERSION attribute/value. After the existing code, if the required attribute/value is set to "Y", exit the app (calling function ExitApp).
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 convert the logo data to an image and store on the device's app folder are handled by the PDA_SITE changes specified above.
All changes to set the style ID on the device from the parsed data received are handled by the PDA_SITE changes specified above.  




All changes to set the style and 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 style and style ID fields from the site before processing. If the values have changed after loading the Site, refresh the Login display, by calling Ti.App.style.restyleItemsEx(win, true);
 
 
=== Style ===
;\Resources\System\style.js
* Remove the setting of Ti.App.style.configItems completely - note this is when it is populated with values, not when it is created as {}.
* Default Ti.App.style._style to <nowiki>''</nowiki> (OBS default), rather than the value from the system property.
 
Remove all altLogo*.* image files from the application directory \Resources\images.






<!-- MEDIA LANDSCAPE YES -->  
<!-- MEDIA LANDSCAPE YES -->  
= Appendix A: TEST PLAN  =
= Appendix A: TEST PLAN  =
{{Warning}}
{{TestPlan_Header
{{TestPlan_Header
|Title={{#var:Doc_Title}}
|Title={{#var:Doc_Title}}
Line 477: Line 359:
|Prerequisites=The prerequisites of the test
|Prerequisites=The prerequisites of the test
|Objective=The details of what each group of tests is to achieve
|Objective=The details of what each group of tests is to achieve
}}  
}} {{ #vardefine: Cycle | 0 }}{{ #vardefine: SubCycle | 0 }}
{{ #vardefine: Cycle | 0 }}{{ #vardefine: SubCycle | 0 }}
{{TestPlan_CycleHeader
|Cycle={{ #vardefineecho: Cycle | {{ #expr: {{ #var: Cycle }} + 1 }} }}{{ #vardefine: SubCycle | {{ #var: Cycle }} }}
|Title=Admin
|Notes=
}} <!--INSERT TESTS HERE --> {{TestPlan_Test
|Test={{ #vardefineecho: SubCycle | {{ #expr: {{ #var: SubCycle }} + 0.01 }} }}
|Action=Find Job Groups
|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
{{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=Area being tested in this cycle
|Title=Mobile Device
|Notes=Any notes or prerequisites for the tests following.
|Notes=Ensure the site is set up with the default style
}} <!--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 actions to follow
|Action=Start the application. Select Preferences.
|Result=The expected result
|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=The actions to follow
|Action=Exit preferences.
|Result=The expected result
|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=The actions to follow
|Action=Exit the device application. Change the style server side to a client style. Log on.
|Result=The expected result
|Result=The device displays in the client style.
|Remarks=
|Remarks=
|PassFail=
|PassFail=
Line 513: Line 429:
|REQ=0
|REQ=0
|EST=0
|EST=0
|FS=2.75
|FS=2.0
|TS=0
|TS=0
|DEV=11
|DEV=6
|ST=2.25
|ST=1.75
|IMP=1.75
|IMP=1
|PM=1.0
|PM=0.5
|Client={{#var:Client}}
|Client={{#var:Client}}
|Year={{#var:Year}}
|Year={{#var:Year}}

Latest revision as of 16:31, 19 August 2015





Aptean Logo.png







OBS Logistics Ltd

EPOD Server-Side Settings


CALIDUS EPOD

19th August 2015 - 0.2
Reference: FS 328780












































Functional Overview

Client Requirement

The Device style settings should not be available to other clients to view. This needs changing with a matter of urgency. (Julie Scott) Feeds into discussions about moving device settings onto the server to allow standardisation of APK and settings across the fleet.


Solution Overview

  • 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 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

Changes will be made to the latest version (3) of CALIDUS EPOD.


Set-up

Pre-requisites

Menu Structure

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 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.


Description of Changes

Database/DAL

Table EPOD_SITE requires the following modifications:

  • 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:

  • EPOD_SITE_INSERT
  • EPOD_SITE_SELECT
  • EPOD_SITE_SELECT_UPDATED_DATA
  • EPOD_SITE_UPDATE

The existing EPOD_SITE DAL object will be changed to:

  • Read the new field. Note Note: It is not necessary to add the field as search-able items.
  • 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

Job Groups

FS 328780 Job Group Maint1.PNG

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). 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

FS 328780 Site Maint2.PNG

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 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:

FS 328780 Site Maint1.PNG


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):

EPOD_SITE.EPL_PDA_STYLE_ID =  ddlEPL_PDA_STYLE_ID.SelectedValue;


Mobile Android Application

Note Note: All changes to methods and functions below should have the JSDoc comments changed to reflect changes to functionality, if appropriate.


Database/DAL

Add new field to EPOD_SITE (PDA_Style_ID)

This should be achieved as follows:

\Resources\Database\DBConnection.js

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 \'\'

Change the last version changed in function InstallDB to the build number of this change (set in \TiApp.xml).


\Resources\Database\PDA_SITE.js

Add new fields to the DAL object in all places affected:

New fields:

  • EPL_PDA_STYLE_ID


Functions/methods affected:

  • function PDA_SITE(EPL_SITE_ID)
    • Add properties for the new fields, defaulted to .
    • When selecting data from the database table EPOD_SITE, populate the values of the new fields. If the record does not exist, these should default to .
  • method Update
    • Add the new fields to the database update SQL and parameters, and to the database insert SQL and parameters.
  • function InsertPDASite
    • Add the new fields as parameters to the function.
    • Add the new fields to the database insert SQL and parameters.
  • function UpdatePDASite
    • Add the new fields as parameters to the function.
    • Add the new fields to the database update SQL and parameters.
  • function InsertAllPDASites
    • 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).
  • function InsertAllPDASitesJSON
    • 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).


App Load

Set style and ID on the device from the parsed data in the site table

This should be achieved as follows:

\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:

  • Set Ti.App.style._style to the value in EPL_PDA_STYLE_ID.


Preferences

Remove the Style preference from the mobile device preferences.

This should be achieved as follows:

\platform\android\res\values\array.xml
Remove the styleNames string-array.


\platform\android\res\xml\preferences.xml
Remove the STYLE ListPreference.


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 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);


Appendix A: TEST PLAN

Test Script / Scenario ReferenceEPOD Server-Side SettingsCall Number(s): 328780
Test Script / Scenario Descriptiondescription of what is to be achievedPASS / ISSUES / FAIL
Menu AccessWhere on the menus the item can be found 
Pre-requisitesThe prerequisites of the testTested By:
 
Test ObjectiveThe details of what each group of tests is to achieveDate:
 


Step Action Result Remarks P/F
1 Admin      
       
1.01 Find Job Groups POD/POC/Service report formats are displayed correctly in the grid    
1.02 Edit a Job Group. POD/POC/Service report formats are displayed correctly in the pop-up screen    
1.03 Change a POD, POC and Service format. Only the values set up in the lists are visible or selectable in the drop-down lists. The values are saved correctly.    
1.04 Open the Site screen POD/POC/Service report formats are displayed correctly in the screen    
1.05 Edit a site 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.    


Step Action Result Remarks P/F
2 Mobile Device      
  Ensure the site is set up with the default style      
2.01 Start the application. Select Preferences. No Style is displayed.    
2.02 Exit preferences. Data uploads from the site. The device displays in the default style.    
2.03 Exit the device application. Change the style server side to a client style. Log on. The device displays in the client style.    


Appendix B: Quote & Document References

Cost Details
Activity Estimate
No. of Days
No. of Days Rate per Day (£) Cost (£ Exc. VAT)
Requirements 0.00 0.00 0 £0.00
Change Request Evaluation 0.00 0.00 0 £0.00
Functional Specification 2.00 2.00 0 £0.00
Technical Specification 0.00 0.00 0 £0.00
Development 6.00 6.00 0 £0.00
Testing and Release 1.75 1.75 0 £0.00
Implementation 1.00 1.00 0 £0.00
Project Management 0.50 0.50 0 £0.00
 
TOTAL 11.25 11.25   £0.00
Estimate excludes training, release to live and go live support.

B.1 References

Ref NoDocument Title & IDVersionDate
1   


B.2 Glossary

Term Definition
EPOD Electronic Proof of Delivery. The OBS EPOD system is CALIDUS ePOD.
CALIDUS eSERV The OBS mobile system to complete Service functionality in the field. This is part of the CALIDUS ePOD system.
PDA The mobile device on which the C-ePOD system will run in the field. This can be a Phone, EDA or industrial PDA, running Android.
DAL Data Access Layer. A mechanism for accessing data by the system that is removed from the application, allowing for simplified access and providing protection to the data, as only approved DAL methods can be used to modify it.
GPS Global Positioning System. A mechanism of retrieving accurate positioning information in the form of Latitude and Longitude (Lat-Long) co-ordinates from a device.
GPRS, 3G, HSDPA, Data Service All terms referring to mobile device network connectivity, and the speed at which the device connects to the internet.


B.3 Authorised By


Murray Middleton

OBS Development Manager
_____________________________

Julie Scott

Sponsor
_____________________________