Skip to content

Commit

Permalink
Merge #7237
Browse files Browse the repository at this point in the history
7237: Minor updates for employee registry and rubrics management page r=jmcameron a=jmcameron

This PR implements some minor changes for the employee registry and the payroll rubrics management page.
   - When editing an employee, the "Submit" button now reads "Update Employee" instead of "Register Employee"
   - Fixed various English payroll-related terms (eg, "grapped" (saiser) should be changed to "entered")
   - Add an Index type column to the Rubric management page (if using indexes).  Hovering over the labels in these cells will bring up a tooltip describing them.

Closes #7206

This are just a few superficial fixes.  The terminology (in English) for all payroll activities needs to be scrubbed.

Co-authored-by: Jonathan Cameron <jmcameron@gmail.com>
  • Loading branch information
bors[bot] and jmcameron authored Aug 30, 2023
2 parents 1543ff4 + 0d76073 commit 11e1a0f
Show file tree
Hide file tree
Showing 9 changed files with 81 additions and 15 deletions.
3 changes: 2 additions & 1 deletion client/src/i18n/en/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
"TRIAL_BALANCE": "Trial Balance",
"UNHIDE" : "Unhide",
"UNLOCK" : "Unlock",
"UPDATE_EMPLOYEE": "Update Employee",
"UPDATE_PASSWORD": "Update Password",
"UPDATE": "Update",
"VALIDATE": "Validate",
Expand Down Expand Up @@ -770,7 +771,7 @@
"SELECT_MULTIPLE": "Select Multiple",
"SELECT_ONE": "Select One",
"SELECT": "Select",
"SENIORITY_BONUS": "seniority bonus",
"SENIORITY_BONUS": "Seniority Bonus",
"SERIAL_NUMBER": "Serial Number",
"SERVER_DATE": "Server Date",
"SERVICE": "Service",
Expand Down
5 changes: 3 additions & 2 deletions client/src/i18n/en/payroll.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"IMPORT" : "Import rubrics (indexes)",
"INDEXES" : "Indexes",
"INDICE" : "Index",
"INDICE_TO_GRAPE" : "This rubric must be grapped",
"INDEX_TO_ENTER" : "This index is to be entered",
"INDICE_TYPE" : "Index type",
"INDIVIDUAL_PERFORMANCE": "Individual performance",
"IS_BASE_INDEX" : "This rubric is a base index",
Expand All @@ -32,6 +32,7 @@
"IS_EXTRA_DAY" : "This rubric is extra days",
"IS_GROSS_SALARY" : "This rubric is the gross salary",
"IS_INDICE" : "This rubric is an index",
"IS_INDEX_SHORT" : "Index?",
"IS_MONETARY_VALUE": "This rubric is a monetary value",
"IS_NUMBER_OF_DAYS" : "This rubric is the number of days",
"IS_OTHER_PROFIT" : "This rubric is other profit",
Expand All @@ -53,7 +54,7 @@
"RELATIVE_POINT": "Relative point",
"RESPONSABILITY" : "Responsability",
"SENIORITY_INDEX": "The seniority index",
"SELECT_INDICE_TYPE" : "Select Index type",
"SELECT_INDICE_TYPE" : "Select index type",
"SUM_OF_RUBRICS": "Sum of others",
"TITLE" : "Payroll Rubric Management",
"TOTAL_CODE" : "Total code",
Expand Down
1 change: 1 addition & 0 deletions client/src/i18n/fr/form.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
"UNHIDE" : "Révéler",
"UNLOCK" : "Débloquer",
"UPDATE": "Mettre à jour",
"UPDATE_EMPLOYEE": "Modifier l'employé",
"UPDATE_PASSWORD": "Modifier le mot de passe",
"VALIDATE": "Valider",
"VIEW_DETAILS": "Voir les détails",
Expand Down
5 changes: 3 additions & 2 deletions client/src/i18n/fr/payroll.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"PARTIALLY_PAID" : "Payé partiellement",
"WAITING_FOR_CONFIGURATION" : "En attente de configuration",
"WAITING_FOR_PAYMENT" : "En attente de paiement"
},
},
"PAYROLL_RUBRIC" : {
"ADD_PAYROLL_RUBRIC" : "Ajouter une rubrique de paie",
"ADD_PAYROLL_RUBRIC_CONFIGURATION" : "Ajouter une configuration des rubriques",
Expand All @@ -23,7 +23,7 @@
"IMPORT" : "Importer les rubriques (indices)",
"INDEXES" : "Indices",
"INDICE" : "Indice",
"INDICE_TO_GRAPE" : "Cette rubrique est à saisir",
"INDEX_TO_ENTER" : "Cette rubrique est à saisir",
"INDICE_TYPE" : "Type d'indice",
"INDIVIDUAL_PERFORMANCE": "Performance individuel",
"IS_BASE_INDEX" : "Cette rubrique est un indice de base",
Expand All @@ -32,6 +32,7 @@
"IS_EXTRA_DAY" : "Cette rubrique est le nombre des jours supplémentaires",
"IS_GROSS_SALARY" : "Cette rubrique est le salaire brute",
"IS_INDICE" : "Cette rubrique est un indice",
"IS_INDEX_SHORT" : "Indice?",
"IS_MONETARY_VALUE": "Cette rubrique est une valeur monnetaire",
"IS_NUMBER_OF_DAYS" : "Cette rubrique est le nombre de jours",
"IS_OTHER_PROFIT" : "Cette rubric est autres profits",
Expand Down
2 changes: 1 addition & 1 deletion client/src/modules/employees/registration/employees.html
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ <h4 translate>FORM.LABELS.CURRENT_LOCATION</h4>
<!-- submit button-->
<div class="panel-footer text-right">
<bh-loading-button loading-state="EmployeeRegistrationForm.$loading">
<span translate>FORM.BUTTONS.REGISTER_EMPLOYEE</span>
<span translate>{{EmployeeCtrl.updateEditLabel}}</span>
</bh-loading-button>
</div>
</div>
Expand Down
4 changes: 4 additions & 0 deletions client/src/modules/employees/registration/employees.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ function EmployeeController(Employees, Services, Grades, Functions, Titles, Cred
vm.enterprise = Session.enterprise;

vm.isUpdating = $state.params.uuid;
vm.updateEditLabel = vm.isUpdating
? 'FORM.BUTTONS.UPDATE_EMPLOYEE'
: 'FORM.BUTTONS.REGISTER_EMPLOYEE';

vm.origin = '';

if (referenceUuid && !saveAsEmployee) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
</bh-yes-no-radios>

<bh-yes-no-radios
label="PAYROLL_RUBRIC.INDICE_TO_GRAPE"
label="PAYROLL_RUBRIC.INDEX_TO_ENTER"
value="RubricModalCtrl.rubric.indice_to_grap"
name="indice_to_grap"
on-change-callback="RubricModalCtrl.indiceToGrapSetting(value)">
Expand Down
66 changes: 58 additions & 8 deletions client/src/modules/payroll/rubrics/rubrics.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ RubricManagementController.$inject = [
'RubricService', 'ModalService',
'NotifyService', 'uiGridConstants', '$state',
'SessionService', 'GridColumnService', 'GridStateService',
'ModalService', 'LanguageService',
'ModalService', 'LanguageService', '$translate',
];

/**
Expand All @@ -16,7 +16,7 @@ RubricManagementController.$inject = [
*/
function RubricManagementController(
Rubrics, ModalService, Notify, uiGridConstants,
$state, Session, Columns, GridState, Modal, Language
$state, Session, Columns, GridState, Modal, Language, $translate,
) {
const vm = this;
const cacheKey = 'RubricUigrid';
Expand All @@ -29,20 +29,43 @@ function RubricManagementController(
vm.openColumnConfiguration = openColumnConfiguration;
vm.currencySymbol = Session.enterprise.currencySymbol;

vm.convertIndexType = function convertIndexType(key) {
const item = Rubrics.indexesMap.find(elt => elt.id === key);
if (item) {
return $translate.instant(item.label);
}
return '';
};

// global variables
vm.gridApi = {};
vm.filterEnabled = false;

const gridColumn = [
{ field : 'label', displayName : 'FORM.LABELS.DESIGNATION', headerCellFilter : 'translate' },
{ field : 'abbr', displayName : 'FORM.LABELS.ABBREVIATION', headerCellFilter : 'translate' },
{
field : 'label',
displayName : 'FORM.LABELS.DESIGNATION',
headerTooltip : 'FORM.LABELS.DESIGNATION',
headerCellFilter : 'translate',
},
{
field : 'abbr',
displayName : 'FORM.LABELS.ABBREVIATION',
headerTooltip : 'FORM.LABELS.ABBREVIATION',
headerCellFilter : 'translate',
},
{
field : 'is_discount',
displayName : '(+)/(-)',
cellTemplate : '/modules/payroll/rubrics/templates/discount.tmpl.html',
headerCellFilter : 'translate',
},
{ field : 'value', displayName : 'FORM.LABELS.VALUE', headerCellFilter : 'translate' },
{
field : 'value',
displayName : 'FORM.LABELS.VALUE',
headerTooltip : 'FORM.LABELS.VALUE',
headerCellFilter : 'translate',
},
{
field : 'is_percent',
displayName : '%',
Expand All @@ -51,57 +74,84 @@ function RubricManagementController(
},
{
field : 'is_indice',
displayName : 'PAYROLL_RUBRIC.IS_INDICE',
displayName : 'PAYROLL_RUBRIC.IS_INDEX_SHORT',
headerTooltip : 'PAYROLL_RUBRIC.IS_INDICE',
cellTemplate : '/modules/payroll/rubrics/templates/index.tmpl.html',
headerCellFilter : 'translate',
},
{
field : 'indice_type',
displayName : 'PAYROLL_RUBRIC.INDICE_TYPE',
headerCellFilter : 'translate',
cellTemplate : '/modules/payroll/rubrics/templates/index_type.tmpl.html',
visible : false,
},
{
field : 'is_social_care',
displayName : 'FORM.LABELS.IS_SOCIAL_CARE',
headerToolTip : 'FORM.LABELS.IS_SOCIAL_CARE',
cellTemplate : '/modules/payroll/rubrics/templates/social.tmpl.html',
headerCellFilter : 'translate',
visible : false,
},
{
field : 'is_membership_fee',
displayName : 'FORM.INFO.IS_MEMBERSHIP_FEE',
headerToolTip : 'FORM.INFO.IS_MEMBERSHIP_FEE',
cellTemplate : '/modules/payroll/rubrics/templates/membership.tmpl.html',
headerCellFilter : 'translate',
visible : false,
},
{
field : 'is_tax',
displayName : 'FORM.LABELS.TAX',
headerToolTip : 'FORM.LABELS.TAX',
cellTemplate : '/modules/payroll/rubrics/templates/tax.tmpl.html',
headerCellFilter : 'translate',
},
{
field : 'is_ipr',
displayName : 'FORM.LABELS.IS_IPR',
headerToolTip : 'FORM.LABELS.IS_IPR',
cellTemplate : '/modules/payroll/rubrics/templates/ipr.tmpl.html',
headerCellFilter : 'translate',
},
{
field : 'is_associated_employee',
displayName : 'FORM.LABELS.EMPLOYEE_ID',
headerToolTip : 'FORM.LABELS.EMPLOYEE_ID',
cellTemplate : '/modules/payroll/rubrics/templates/associated.tmpl.html',
headerCellFilter : 'translate',
},
{
field : 'is_seniority_bonus',
displayName : 'FORM.LABELS.SENIORITY_BONUS',
headerToolTip : 'FORM.LABELS.SENIORITY_BONUS',
cellTemplate : '/modules/payroll/rubrics/templates/seniority.tmpl.html',
headerCellFilter : 'translate',
visible : false,
},
{
field : 'is_family_allowances',
displayName : 'FORM.LABELS.FAMILY_ALLOWANCES',
headerToolTip : 'FORM.LABELS.FAMILY_ALLOWANCES',
cellTemplate : '/modules/payroll/rubrics/templates/allowances.tmpl.html',
headerCellFilter : 'translate',
visible : false,
},
{
field : 'debtorAccount', displayName : 'FORM.LABELS.DEBTOR_ACCOUNT', headerCellFilter : 'translate',
field : 'debtorAccount',
displayName : 'FORM.LABELS.DEBTOR_ACCOUNT',
headerToolTip : 'FORM.LABELS.DEBTOR_ACCOUNT',
headerCellFilter : 'translate',
visible : false,
},
{
field : 'expenseAccount', displayName : 'FORM.LABELS.EXPENSE_ACCOUNT', headerCellFilter : 'translate',
field : 'expenseAccount',
displayName : 'FORM.LABELS.EXPENSE_ACCOUNT',
headerToolTip : 'FORM.LABELS.EXPENSE_ACCOUNT',
headerCellFilter : 'translate',
visible : false,
},
{
field : 'action',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<div class="ui-grid-cell-contents text-left">
<div ng-if="row.entity.indice_type"
uib-tooltip="{{ grid.appScope.convertIndexType(row.entity.indice_type) }}"
tooltip-append-to-body="true"
tooltip-placement="left">
<span translate>{{row.entity.indice_type}}</span>
</div>
</div>

0 comments on commit 11e1a0f

Please sign in to comment.