-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
magnussolution
committed
Jul 7, 2022
1 parent
48ade80
commit aabda84
Showing
28 changed files
with
512 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/** | ||
* Classe que define a model "UserHistory" | ||
* | ||
* ======================================= | ||
* ################################### | ||
* MagnusBilling | ||
* | ||
* @package MagnusBilling | ||
* @author Adilson Leffa Magnus. | ||
* @copyright Copyright (C) 2005 - 2021 MagnusBilling. All rights reserved. | ||
* ################################### | ||
* | ||
* This software is released under the terms of the GNU Lesser General Public License v3 | ||
* A copy of which is available from http://www.gnu.org/copyleft/lesser.html | ||
* | ||
* Please submit bug reports, patches, etc to https://github.com/magnusbilling/mbilling/issues | ||
* ======================================= | ||
* Magnusbilling.com <[email protected]> | ||
* 06/06/2022 | ||
*/ | ||
Ext.define('MBilling.model.UserHistory', { | ||
extend: 'Ext.data.Model', | ||
fields: [{ | ||
name: 'id', | ||
type: 'int' | ||
}, { | ||
name: 'date', | ||
type: 'date', | ||
dateFormat: 'Y-m-d H:i:s' | ||
}, { | ||
name: 'id_user', | ||
type: 'int' | ||
}, 'description', 'idUserusername'], | ||
proxy: { | ||
type: 'uxproxy', | ||
module: 'userHistory' | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Classe que define o store "UserHistory" | ||
* | ||
* ======================================= | ||
* ################################### | ||
* MagnusBilling | ||
* | ||
* @package MagnusBilling | ||
* @author Adilson Leffa Magnus. | ||
* @copyright Copyright (C) 2005 - 2021 MagnusBilling. All rights reserved. | ||
* ################################### | ||
* | ||
* This software is released under the terms of the GNU Lesser General Public License v3 | ||
* A copy of which is available from http://www.gnu.org/copyleft/lesser.html | ||
* | ||
* Please submit bug reports, patches, etc to https://github.com/magnusbilling/mbilling/issues | ||
* ======================================= | ||
* Magnusbilling.com <[email protected]> | ||
* 06/06/2022 | ||
*/ | ||
Ext.define('MBilling.store.UserHistory', { | ||
extend: 'Ext.data.Store', | ||
model: 'MBilling.model.UserHistory' | ||
}); |
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/** | ||
* Classe que define a lista de "UserHistory" | ||
* | ||
* ======================================= | ||
* ################################### | ||
* MagnusBilling | ||
* | ||
* @package MagnusBilling | ||
* @author Adilson Leffa Magnus. | ||
* @copyright Copyright (C) 2005 - 2021 MagnusBilling. All rights reserved. | ||
* ################################### | ||
* | ||
* This software is released under the terms of the GNU Lesser General Public License v3 | ||
* A copy of which is available from http://www.gnu.org/copyleft/lesser.html | ||
* | ||
* Please submit bug reports, patches, etc to https://github.com/magnussolution/magnusbilling7/issues | ||
* ======================================= | ||
* Magnusbilling.org <[email protected]> | ||
* 22/06/2022 | ||
*/ | ||
Ext.define('MBilling.view.userHistory.Controller', { | ||
extend: 'Ext.ux.app.ViewController', | ||
alias: 'controller.userhistory' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/** | ||
* Classe que define a lista de "UserHistory" | ||
* | ||
* ======================================= | ||
* ################################### | ||
* MagnusBilling | ||
* | ||
* @package MagnusBilling | ||
* @author Adilson Leffa Magnus. | ||
* @copyright Copyright (C) 2005 - 2021 MagnusBilling. All rights reserved. | ||
* ################################### | ||
* | ||
* This software is released under the terms of the GNU Lesser General Public License v3 | ||
* A copy of which is available from http://www.gnu.org/copyleft/lesser.html | ||
* | ||
* Please submit bug reports, patches, etc to https://github.com/magnussolution/magnusbilling7/issues | ||
* ======================================= | ||
* Magnusbilling.org <[email protected]> | ||
* 22/06/2022 | ||
*/ | ||
Ext.define('MBilling.view.userHistory.Form', { | ||
extend: 'Ext.ux.form.Panel', | ||
alias: 'widget.userhistoryform', | ||
initComponent: function() { | ||
var me = this; | ||
me.items = [{ | ||
xtype: 'userlookup', | ||
ownerForm: me, | ||
name: 'id_user', | ||
fieldLabel: t('Username'), | ||
hidden: App.user.isClient | ||
}, { | ||
xtype: 'datetimefield', | ||
name: 'date', | ||
fieldLabel: t('Date'), | ||
format: 'Y-m-d H:i:s', | ||
hidden: !App.user.isAdmin, | ||
allowBlank: true, | ||
value: new Date() | ||
}, { | ||
xtype: 'textareafield', | ||
name: 'description', | ||
fieldLabel: t(''), | ||
readOnly: App.user.isClient, | ||
height: 400, | ||
anchor: '100%', | ||
labelWidth: '100%', | ||
labelAlign: 'left' | ||
}]; | ||
me.callParent(arguments); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
/** | ||
* Classe que define a lista de "UserHistory" | ||
* | ||
* ======================================= | ||
* ################################### | ||
* MagnusBilling | ||
* | ||
* @package MagnusBilling | ||
* @author Adilson Leffa Magnus. | ||
* @copyright Copyright (C) 2005 - 2021 MagnusBilling. All rights reserved. | ||
* ################################### | ||
* | ||
* This software is released under the terms of the GNU Lesser General Public License v3 | ||
* A copy of which is available from http://www.gnu.org/copyleft/lesser.html | ||
* | ||
* Please submit bug reports, patches, etc to https://github.com/magnussolution/magnusbilling7/issues | ||
* ======================================= | ||
* Magnusbilling.org <[email protected]> | ||
* 22/06/2022 | ||
*/ | ||
Ext.define('MBilling.view.userHistory.List', { | ||
extend: 'Ext.ux.grid.Panel', | ||
alias: 'widget.userhistorylist', | ||
store: 'UserHistory', | ||
fieldSearch: 'idUser.username', | ||
initComponent: function() { | ||
var me = this; | ||
me.columns = [{ | ||
header: t('ID'), | ||
dataIndex: 'id', | ||
flex: 1, | ||
hidden: true, | ||
hideable: App.user.isAdmin | ||
}, { | ||
header: t('Username'), | ||
dataIndex: 'idUserusername', | ||
filter: { | ||
type: 'string', | ||
field: 'idUser.username' | ||
}, | ||
flex: 3, | ||
hidden: App.user.isClient, | ||
hideable: !App.user.isClient | ||
}, { | ||
header: t('Description'), | ||
dataIndex: 'description', | ||
flex: 5, | ||
hidden: window.isTablet | ||
}, { | ||
header: t('Date'), | ||
renderer: Ext.util.Format.dateRenderer('Y-m-d H:i:s'), | ||
dataIndex: 'date', | ||
flex: 4, | ||
hidden: window.isTablet | ||
}]; | ||
me.callParent(arguments); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Classe que define a lista de "UserHistory" | ||
* | ||
* ======================================= | ||
* ################################### | ||
* MagnusBilling | ||
* | ||
* @package MagnusBilling | ||
* @author Adilson Leffa Magnus. | ||
* @copyright Copyright (C) 2005 - 2021 MagnusBilling. All rights reserved. | ||
* ################################### | ||
* | ||
* This software is released under the terms of the GNU Lesser General Public License v3 | ||
* A copy of which is available from http://www.gnu.org/copyleft/lesser.html | ||
* | ||
* Please submit bug reports, patches, etc to https://github.com/magnussolution/magnusbilling7/issues | ||
* ======================================= | ||
* Magnusbilling.org <[email protected]> | ||
* 22/06/2022 | ||
*/ | ||
Ext.define('MBilling.view.userHistory.Module', { | ||
extend: 'Ext.ux.panel.Module', | ||
alias: 'widget.userhistorymodule', | ||
controller: 'userhistory' | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<?php | ||
/** | ||
* Acoes do modulo "UserHistory". | ||
* | ||
* ======================================= | ||
* ################################### | ||
* MagnusBilling | ||
* | ||
* @package MagnusBilling | ||
* @author Adilson Leffa Magnus. | ||
* @copyright Todos os direitos reservados. | ||
* ################################### | ||
* ======================================= | ||
* Magnusbilling.com <[email protected]> | ||
* 06/06/2022 | ||
*/ | ||
|
||
class UserHistoryController extends Controller | ||
{ | ||
public $attributeOrder = 'date DESC'; | ||
public $extraValues = array('idUser' => 'username'); | ||
|
||
public $fieldsFkReport = array( | ||
'id_user' => array( | ||
'table' => 'pkg_user', | ||
'pk' => 'id', | ||
'fieldReport' => 'username', | ||
), | ||
); | ||
|
||
public function init() | ||
{ | ||
$this->instanceModel = new UserHistory; | ||
$this->abstractModel = UserHistory::model(); | ||
$this->titleReport = Yii::t('zii', 'User History'); | ||
|
||
parent::init(); | ||
} | ||
} |
Oops, something went wrong.