Project

General

Profile

Bug #1308 » performance.js

Tri Rizqiaty, 07/01/2022 05:22 PM

 
1
Ext.define('MinovaES.view.performance.performance', {
2
    extend: 'Ext.form.Panel',
3
    alias: 'widget.performance-maintenance',
4
    requires: [
5
        'MinovaES.controller.performance.controllerperformance',
6
        'Ext.grid.*',
7
        'Ext.data.*',
8
        'Ext.util.*'
9
    ],
10
    controller: 'performancemaintenance-controller',
11
    renderTo: 'panel-extjs',
12
    anchor: '100%',
13
    margin: '0 0 10 0',
14
    empId: undefined,
15
    bizproc: undefined,
16
    regID: undefined,
17
    taskIDRun:undefined,
18
    seq:undefined,
19
    empName: undefined,
20
    isworkflow: false,
21
    initComponent: function () {
22
        var me = this;
23
        if (me.empId == undefined) {
24
            me.empId = getParam("EmployeeID");
25
            me.empName = getParam("FullName");
26
        }        
27
        Ext.applyIf(me, {
28
            items: [{
29
                title: 'Employee Overview' + ' - ' + me.empId + ' - ' + me.empName,
30
                xtype: 'MinovaHeadermdNew',
31
                collapsible: true,
32
                hidden: me.isworkflow,
33
                isEmployee: true,
34
                empId: me.empId,
35
                border: false,
36
                bodyPadding: 0,
37
                tools: [{
38
                    type: 'gear',
39
                    tooltip: 'Go to Another Employee',
40
                    name: 'gotoother'
41
                }
42
                ],
43
            }, {
44
                layout: 'card',
45
                name: 'PerformanceCard',
46
                items: [{
47
                    xtype: 'minovagrid1',
48
                    title: 'Performance',
49
                    header: !(me.isworkflow),
50
                    height: 300,
51
                    autoLoad: false,
52
                    tableName: 'phrpa0047',
53
                    storename: 'PerformanceOverview',
54
                    name: 'PA0047',
55
                    margin: '0 0 10 0',
56
                    pagesize: 10,
57
                    tbar: [{
58
                        xtype: 'button',
59
                        text: 'Action',
60
                        name: 'actionGrid',
61
                        menu: [
62
						//{
63
                        //    text: 'Add',
64
                        //    name: 'addPerformance',
65
                        //    style: 'font-family: FontAwesome',
66
                        //    iconCls: 'fa-plus-circle',
67
                        //}, 
68
						{
69
                            text: 'Edit',
70
                            name: 'editPerformance',
71
                            iconCls: 'fa-edit',
72
                            style: 'font-family: FontAwesome',
73
                        }, {
74
                            xtype: 'tbfill'
75
                        }
76
                        ]
77
                    }
78
                    ],
79
                    dockedItems: [{
80
                        xtype: 'pagingtoolbar',
81
                        store: 'PerformanceOverview',
82
                        dock: 'bottom',
83
                        pageSize: me.pagesize,
84
                        displayInfo: true
85
                    }
86
                    ]
87
                }, {
88
                    xtype: 'form',
89
                    name: 'formPerformanceMain',
90
                    items: [{
91
                        xtype: 'minovaForm',
92
                        title: 'Performance Header',
93
                        header: !(me.isworkflow),
94
                        bodyBorder: false,
95
                        cls: 'borderLookup',
96
                        border: false,
97
                        isLookup: false,
98
                        name: "mainformPerformance",
99
                        tableName: 'PDSPM0001'
100
                    }, {
101
                        xtype: 'form',
102
                        name: 'formPerformanceDetail'
103
                    }
104
                    ],
105
                    buttons: [{
106
                        text: 'Back to Grid',
107
                        name: 'cancelPerformance',
108
                        iconCls: 'fa-reply',
109
                        style: 'font-family: FontAwesome',
110
                        margin: '3 3 10 3',
111
                    }, 
112
					//{			//// comment by Tri nwh 20220701
113
                    //    text: 'Save',
114
                    //    name: 'savePerformance',
115
                    //    iconCls: 'fa-save',
116
                    //    style: 'font-family: FontAwesome',
117
                    //    margin: '3 3 10 3',
118
                    //}, 
119
					{
120
                        text: 'Delete',
121
                        name: 'deletePerformance',
122
                        iconCls: 'fa-trash-o',
123
                        style: 'font-family: FontAwesome',
124
                        margin: '3 3 10 3',
125

    
126
                    }
127
                    ]
128
                }
129
                ]
130
            }
131
            ]
132
        });
133
        me.callParent(arguments);
134
    }
135
});
(3-3/3)