Custom data settings - {{customer.name}}

Personal Data

Default config and Custom config (PERSON_CUSTOM_DATA.json)

Sample form

[{
        "name": "Custom field 1",
        "type": "template",
        "template": "<div class='form-group'><label class='control-label col-md-4' for='{{form.id}}'>{{form.name}}</label><div class='col-md-8'><input type='text' sf-field-model schema-validate='form' class='form-control input-md' id='{{form.id}}' name='{{form.id}}' placeholder='{{form.placeholder}}'></div></div>",
        "key": "custom_field_1",
        "id": "custom_field_1",
        "placeholder": "your custom field 1",
        "feedback": false,
        "disableSuccessState": true,
        "disableErrorState": true
    }
]

Custom file form element structure

{
    "name": "ID card",
    "key": "id_card",
    "id": "id_card",
    "type": "nwpFileUpload",
    "endpoint": "/web/admin/user/custom/file/{{user.personId}}?field_name=id_card",
    "i18n": {
      "add": "Open file browser",
      "preview": "Preview Upload",
      "filename": "File Name",
      "progress": "Progress Status",
      "upload": "Upload",
      "dragorclick": "Drag and drop your ID card image here"
    }
}

Sample schema

{
    "type": "object",
    "properties": {
        "custom_field_1": { 
            "type": "template", 
            "title": "Custom field 1"
        }
    }
}

Custom file form element schema suructure

"id_card": {
    "title": "ID card image",
    "type": "array",
    "format": "singlefile",
    "x-schema-form": {
      "type": "array"
    },
    "pattern": {
      "mimeType": "image/*",
      "validationMessage": "Wrong file type: "
    },
    "maxSize": {
      "maximum": "1MB",
      "validationMessage": "File size is too large. Maximum allowed is 1MB"
    },
    "maxItems": {
      "validationMessage": "One file is allowed to upload"
    },
    "minItems": {
      "validationMessage": "Select image to upload"
    }
}

angular-schema-form

Documentation

File upload addon

Reference

name - (Required) Field name in user form and report column.
type and template- (Required) No need to change these.
key and id - (Required) Should be unique. key is the field bind to datagrid "field" value.
dataType - (Optional) column data type. [possible: 'date', 'number', 'string'] if not specified, will consider as strings.
cellFilter - (Optional) Cell filter to be applied in report column.
placeholder - (Optional) Text field placeholder in user form
feedback, disableSuccessState, disableErrorState - (Required, no need to change)

Visitor Data

Default config and Custom config (VISITOR_CUSTOM_DATA.json)

Sample form

[{
        "name": "Custom field 1",
        "type": "template",
        "template": "<div class='form-group'><label class='control-label col-md-4' for='{{form.id}}'>{{form.name}}</label><div class='col-md-8'><input type='text' sf-field-model schema-validate='form' class='form-control input-md' id='{{form.id}}' name='{{form.id}}' placeholder='{{form.placeholder}}'></div></div>",
        "key": "custom_field_1",
        "id": "custom_field_1",
        "placeholder": "your custom field 1",
        "feedback": false,
        "disableSuccessState": true,
        "disableErrorState": true
    }
]

Custom file form element structure

{
    "name": "ID card",
    "key": "id_card",
    "id": "id_card",
    "type": "nwpFileUpload",
    "endpoint": "/web/admin/user/custom/file/{{user.personId}}?field_name=id_card",
    "i18n": {
      "add": "Open file browser",
      "preview": "Preview Upload",
      "filename": "File Name",
      "progress": "Progress Status",
      "upload": "Upload",
      "dragorclick": "Drag and drop your ID card image here"
    }
}

Sample schema

{
    "type": "object",
    "properties": {
        "custom_field_1": {
            "type": "template",
            "title": "Custom field 1"
        }
    }
}

Custom file form element schema suructure

"id_card": {
    "title": "ID card image",
    "type": "array",
    "format": "singlefile",
    "x-schema-form": {
      "type": "array"
    },
    "pattern": {
      "mimeType": "image/*",
      "validationMessage": "Wrong file type: "
    },
    "maxSize": {
      "maximum": "1MB",
      "validationMessage": "File size is too large. Maximum allowed is 1MB"
    },
    "maxItems": {
      "validationMessage": "One file is allowed to upload"
    },
    "minItems": {
      "validationMessage": "Select image to upload"
    }
}

angular-schema-form

Documentation

File upload addon

Reference

name - (Required) Field name in user form and report column.
type and template- (Required) No need to change these.
key and id - (Required) Should be unique. key is the field bind to datagrid "field" value.
dataType - (Optional) column data type. [possible: 'date', 'number', 'string'] if not specified, will consider as strings.
cellFilter - (Optional) Cell filter to be applied in report column.
placeholder - (Optional) Text field placeholder in user form
feedback, disableSuccessState, disableErrorState - (Required, no need to change)

Group Data

Default config and Custom config (GROUP_CUSTOM_DATA.json)

Sample form

    [{
            "name": "Custom field 1",
            "type": "template",
            "template": "<div class='row form-group col-md-12 col-sm-12'><label class='control-label col-md-4' for='{{form.id}}'>{{form.name}}</label><div class='col-md-8 input-group'><input type='text' sf-field-model schema-validate='form' class='form-control input-md' id='{{form.id}}' name='{{form.id}}' placeholder='{{form.placeholder}}'></div></div>",
            "key": "custom_field_1",
            "id": "custom_field_1",
            "placeholder": "your custom field 1",
            "feedback": false,
            "disableSuccessState": true,
            "disableErrorState": true
        }
    ]

Sample schema

    {
        "type": "object",
        "properties": {
            "custom_field_1": { 
                "type": "template", 
                "title": "Custom field 1"
            }
        }
    }

angular-schema-form

Reference

name - (Required) Field name in user form and report column.
type and template- (Required) No need to change these.
key and id - (Required) Should be unique. key is the field bind to datagrid "field" value.
dataType - (Optional) column data type. [possible: 'date', 'number', 'string'] if not specified, will consider as strings.
cellFilter - (Optional) Cell filter to be applied in report column.
placeholder - (Optional) Text field placeholder in user form
feedback, disableSuccessState, disableErrorState - (Required, no need to change)

Device Data

Default config and Custom config (DEVICE_CUSTOM_DATA.json)

Sample form

        [{
                "name": "Custom field 1",
                "type": "template",
                "template": "<div class='row form-group col-md-12 col-sm-12'><label class='control-label col-md-4' for='{{form.id}}'>{{form.name}}</label><div class='col-md-8 input-group'><input type='text' sf-field-model schema-validate='form' class='form-control input-md' id='{{form.id}}' name='{{form.id}}' placeholder='{{form.placeholder}}'></div></div>",
                "key": "custom_field_1",
                "id": "custom_field_1",
                "placeholder": "your custom field 1",
                "feedback": false,
                "disableSuccessState": true,
                "disableErrorState": true
            }
        ]

Sample schema

        {
            "type": "object",
            "properties": {
                "custom_field_1": {
                    "type": "template",
                    "title": "Custom field 1"
                }
            }
        }

angular-schema-form

Reference

name - (Required) Field name in user form and report column.
type and template- (Required) No need to change these.
key and id - (Required) Should be unique. key is the field bind to datagrid "field" value.
dataType - (Optional) column data type. [possible: 'date', 'number', 'string'] if not specified, will consider as strings.
cellFilter - (Optional) Cell filter to be applied in report column.
placeholder - (Optional) Text field placeholder in user form
feedback, disableSuccessState, disableErrorState - (Required, no need to change)

Shift Data

Default config and Custom config (SHIFT_CUSTOM_DATA.json)

Sample form

    [{
            "name": "Custom field 1",
            "type": "template",
            "template": "<div class=''><label class='control-label col-md-4' for='{{form.id}}'>{{form.name}}</label><div class='col-md-8'><input type='text' sf-field-model schema-validate='form' class='form-control input-md' id='{{form.id}}' name='{{form.id}}' placeholder='{{form.placeholder}}'></div></div>",
            "key": "custom_field_1",
            "id": "custom_field_1",
            "placeholder": "your custom field 1",
            "feedback": false,
            "disableSuccessState": true,
            "disableErrorState": true
        }
    ]

Sample schema

    {
        "type": "object",
        "properties": {
            "custom_field_1": {
                "type": "template",
                "title": "Custom field 1"
            }
        }
    }

angular-schema-form

Reference

name - (Required) Field name in shift add/edit view and report column.
type and template- (Required) No need to change these.
key and id - (Required) Should be unique. key is the field bind to datagrid "field" value.
dataType - (Optional) column data type. [possible: 'date', 'number', 'string'] if not specified, will consider as strings.
cellFilter - (Optional) Cell filter to be applied in report column.
placeholder - (Optional) Text field placeholder in shift add/edit form
feedback, disableSuccessState, disableErrorState - (Required, no need to change)

Report columns

Calculated column definition

Sample calculated data

 /**
 customColumnDefs.workhour: []
 customColumnDefs.productivity: []
 customColumnDefs.summary: []
 customColumnDefs.users: []
 customColumnDefs.events: []
 customColumnDefs.arrival: []
 customColumnDefs.departure: []
 customColumnDefs.absentee: []
 */
{
    "workhour:[{
                "colName": "payAmount",
                "displayName": "Salary",
                "expression": "(data[i].reports[j].workHours / 3600) * $scope.getCustomDataValByKey( data[i].reports[j].customdata, 'hourly_rate' * 0.98)",
                "type" : "number",
                "styleClass" : "right-align",
                "cellFilter" : "currency:'€'"
            },
            {
                "colName": "taxAmount",
                "displayName": "Tax",
                "expression": "(data[i].reports[j].workHours / 3600) * $scope.getCustomDataValByKey( data[i].reports[j].customdata, 'hourly_rate' * 0.02)",
                "type" : "number",
                "styleClass" : "right-align",
                "cellFilter" : "currency:'€'"
            }],
    "productivity": [{
                "colName": "payAmount",
                "displayName": "Salary",
                "expression": "(data[i].reports[j].workHours / 3600) * $scope.getCustomDataValByKey( data[i].reports[j].customdata, 'hourly_rate' * 0.98)",
                "type" : "number",
                "styleClass" : "right-align",
                "cellFilter" : "currency:'€'"
            },
            {
                "colName": "taxAmount",
                "displayName": "Tax",
                "expression": "(data[i].reports[j].workHours / 3600) * $scope.getCustomDataValByKey( data[i].reports[j].customdata, 'hourly_rate' * 0.02)",
                "type" : "number",
                "styleClass" : "right-align",
                "cellFilter" : "currency:'€'"
            }]
}

Reference

colName - (Required) should not include spaces. use camelcase.
displayName - (Required) Name for the column header.
expression - (Required) data binding expression to calculate this cell value. use data[i].reports[j] for all variables. Use getCustomDataValByKey(obj, key), getCustomDataStringByKey(obj, key) and getCustomDataDateByKey(obj, key) functions to use custom user data with appropriate format. Parameters are custom data object and the key to be search in there. If the key is present, it will return the formatted value. otherwise, return 0, or empty string.
visibility - (Optional, default: false)
type - (Optional, default: string) Possible values are: string, boolean, number, date, object.
styleClass - (Optional, default: right-align) CSS classes to be applied to the cell.
cellFilter - (Optional, default: TwoDecimal) Cell filter to be applied. Should have already been defined in the application.

Eventlog Data

Default config and Custom config (EVENTLOG_CUSTOM_DATA.json)

Sample form

[{
        "name": "Custom field 1",
        "type": "template",
        "template": "<div class='row form-group col-md-12 col-sm-12'><label class='control-label col-md-4' for='{{form.id}}'>{{form.name}}</label><div class='col-md-8 input-group'><input type='text' sf-field-model schema-validate='form' class='form-control input-md' id='{{form.id}}' name='{{form.id}}' placeholder='{{form.placeholder}}'></div></div>",
        "key": "custom_field_1",
        "id": "custom_field_1",
        "placeholder": "your custom field 1",
        "feedback": false,
        "disableSuccessState": true,
        "disableErrorState": true
}]
    

Sample schema

{
    "type": "object",
    "properties": {
        "custom_field_1": {
            "type": "template",
            "title": "Custom field 1"
        }
    }
}
    

angular-schema-form

Reference

name - (Required) Field name in user form and report column.
type and template- (Required) No need to change these.
key and id - (Required) Should be unique. key is the field bind to datagrid "field" value.
dataType - (Optional) column data type. [possible: 'date', 'number', 'string'] if not specified, will consider as strings.
cellFilter - (Optional) Cell filter to be applied in report column.
placeholder - (Optional) Text field placeholder in user form
feedback, disableSuccessState, disableErrorState - (Required, no need to change)

Grid column definitions

Configuration (GRID_CONFIG.json)

External executable parameters

Configuration (CUSTOM_EXTERNAL_EXE_PARAMS.json)

Appointment config

Configuration (APPOINTMENT_CUSTOM_DATA.json)

Visit job config

Configuration json (JOB_CONFIG.json)

Booking page configuration

Upload zip file with booking templates


Booking config (zip) file should have contents in below structure.

  1. common-template folder
    • common templates for booking pages
    • css template for booking page
    • Controller for booking pages
    • controller for add/edit appointment in visit management
  2. ui-template folder
    • booking pages templates for specific visit types
    • schema json template for visit note
  3. locale folder
    • localization for booking pages and control panel tamplates
  4. image folder
    • base64 encoded image files for booking and control panel templates