<commit_before>/// <reference path="../../../../../argos-sdk/libraries/ext/ext-core-debug.js"/>
/// <reference path="../../../../../argos-sdk/libraries/sdata/sdata-client-debug"/>
/// <reference path="../../../../../argos-sdk/libraries/Simplate.js"/>
/// <reference path="../../../../../argos-sdk/src/View.js"/>
/// <reference path="../../../../../argos-sdk/src/Edit.js"/>
/// <reference path="../../Format.js"/>

define('Mobile/SalesLogix/Views/TicketActivity/Edit', [
    'dojo/_base/declare',
    'Mobile/SalesLogix/Template',
    'Sage/Platform/Mobile/Edit'
], function(
    declare,
    template,
    Edit
) {

    return declare('Mobile.SalesLogix.Views.TicketActivity.Edit', [Edit], {

        //Localization
        titleText: 'Edit Ticket Activity',
        activityTypeText: 'type',
        activityTypeTitleText: 'Type',
        publicAccessText: 'public access',
        publicAccessTitleText: 'Public Access',
        userText: 'user',
        startDateText: 'start date',
        endDateText: 'end date',
        chargeTypeText: 'charge type',
        commentsText: 'comments',

        //View Properties
        entityName: 'TicketActivity',
        id: 'ticketactivity_edit',
        querySelect: [
            'ActivityDescription',
            'ActivityTypeCode',
            'AssignedDate',
            'CompletedDate',
            'PublicAccessCode',
            'RateTypeDescription/Amount',
            'RateTypeDescription/RateTypeCode',
            'RateTypeDescription/TypeDescription',
            'User/UserName',
            'User/UserInfo/FirstName',
            'User/UserInfo/LastName'
        ],
        resourceKind: 'ticketActivities',

        applyContext: function(){
            this.inherited(arguments);
            
            var ticketContext = App.isNavigationFromResourceKind( ['tickets'] ),
                ticketKey = ticketContext && ticketContext.key;
            if (ticketKey) this.fields['TicketId'].setValue(ticketKey);
        },

        createLayout: function() {
            return this.layout || (this.layout = [
                {
                    name: 'TicketId',
                    property: 'Ticket.$key',
                    type: 'hidden'
                },
                {
                    label: this.activityTypeText,
                    name: 'ActivityTypeCode',
                    property: 'ActivityTypeCode',
                    requireSelection: true,
                    title: this.activityTypeTitleText,
                    storageMode: 'code',
                    picklist: 'Ticket Activity',
                    type: 'picklist'
                },{
                    label: this.publicAccessText,
                    name: 'PublicAccessCode',
                    property: 'PublicAccessCode',
                    title: this.publicAccessTitleText,
                    storageMode: 'code',
                    picklist: 'Ticket Activity Public Access',
                    type: 'picklist'
                },{
                    label: this.userText,
                    name: 'User',
                    property: 'User',
                    textProperty: 'UserInfo',
                    textTemplate: template.nameLF,
                    type: 'lookup',
                    view: 'user_list'
                },{
                    label: this.startDateText,
                    name: 'AssignedDate',
                    property: 'AssignedDate',
                    type: 'date'
                },{
                    label: this.endDateText,
                    name: 'CompletedDate',
                    property: 'CompletedDate',
                    type: 'date'
                },{
                    label: this.chargeTypeText,
                    name: 'RateTypeDescription',
                    property: 'RateTypeDescription',
                    textProperty: 'RateTypeCode',
                    type: 'lookup',
                    view: 'ticketactivity_ratelookup'
                },{
                    label: this.commentsText,
                    name: 'ActivityDescription',
                    property: 'ActivityDescription',
                    rows: 6,
                    type: 'textarea'
                }
            ]);
        }
    });
});<commit_msg>[#12085830] removed charge type until business rule is made for propagating its calculations to all effected properties<commit_after>/// <reference path="../../../../../argos-sdk/libraries/ext/ext-core-debug.js"/>
/// <reference path="../../../../../argos-sdk/libraries/sdata/sdata-client-debug"/>
/// <reference path="../../../../../argos-sdk/libraries/Simplate.js"/>
/// <reference path="../../../../../argos-sdk/src/View.js"/>
/// <reference path="../../../../../argos-sdk/src/Edit.js"/>
/// <reference path="../../Format.js"/>

define('Mobile/SalesLogix/Views/TicketActivity/Edit', [
    'dojo/_base/declare',
    'Mobile/SalesLogix/Template',
    'Sage/Platform/Mobile/Edit'
], function(
    declare,
    template,
    Edit
) {

    return declare('Mobile.SalesLogix.Views.TicketActivity.Edit', [Edit], {

        //Localization
        titleText: 'Edit Ticket Activity',
        activityTypeText: 'type',
        activityTypeTitleText: 'Type',
        publicAccessText: 'public access',
        publicAccessTitleText: 'Public Access',
        userText: 'user',
        startDateText: 'start date',
        endDateText: 'end date',
        commentsText: 'comments',

        //View Properties
        entityName: 'TicketActivity',
        id: 'ticketactivity_edit',
        querySelect: [
            'ActivityDescription',
            'ActivityTypeCode',
            'AssignedDate',
            'CompletedDate',
            'PublicAccessCode',
            'User/UserName',
            'User/UserInfo/FirstName',
            'User/UserInfo/LastName'
        ],
        resourceKind: 'ticketActivities',

        applyContext: function(){
            this.inherited(arguments);
            
            var ticketContext = App.isNavigationFromResourceKind( ['tickets'] ),
                ticketKey = ticketContext && ticketContext.key;
            if (ticketKey) this.fields['TicketId'].setValue(ticketKey);
        },

        createLayout: function() {
            return this.layout || (this.layout = [
                {
                    name: 'TicketId',
                    property: 'Ticket.$key',
                    type: 'hidden'
                },
                {
                    label: this.activityTypeText,
                    name: 'ActivityTypeCode',
                    property: 'ActivityTypeCode',
                    requireSelection: true,
                    title: this.activityTypeTitleText,
                    storageMode: 'code',
                    picklist: 'Ticket Activity',
                    type: 'picklist'
                },{
                    label: this.publicAccessText,
                    name: 'PublicAccessCode',
                    property: 'PublicAccessCode',
                    title: this.publicAccessTitleText,
                    storageMode: 'code',
                    picklist: 'Ticket Activity Public Access',
                    type: 'picklist'
                },{
                    label: this.userText,
                    name: 'User',
                    property: 'User',
                    textProperty: 'UserInfo',
                    textTemplate: template.nameLF,
                    type: 'lookup',
                    view: 'user_list'
                },{
                    label: this.startDateText,
                    name: 'AssignedDate',
                    property: 'AssignedDate',
                    type: 'date'
                },{
                    label: this.endDateText,
                    name: 'CompletedDate',
                    property: 'CompletedDate',
                    type: 'date'
                },{
                    label: this.commentsText,
                    name: 'ActivityDescription',
                    property: 'ActivityDescription',
                    rows: 6,
                    type: 'textarea'
                }
            ]);
        }
    });
});
{'fraction_non_alphanumeric': 0.1282177004167688, 'fraction_numerical': 0.001225790634959549, 'mean_word_length': 1.3100226500566252, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1664499', 'n_tokens_mistral': 2041, 'n_tokens_neox': 1865, 'n_words': 362}