-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(enterprise): add settings panel
This commit adds a new panel and CRUD interface for operation on enterprise settings. The settings table is linked 1-1 to the enterprise table. Tests have been updated accordingly. The projects service has also been updated to use the PrototypeApiService. Closes #2174.
- Loading branch information
Showing
21 changed files
with
611 additions
and
594 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 |
---|---|---|
@@ -1,8 +1,17 @@ | ||
{"ENTERPRISE":{"ADD_ENTERPRISE":"Add Enterprise.", | ||
"ALL_ENTERPRISES":"All Enterprises", | ||
"CONFIGURATION_ENTERPRISE":"Configuration Enterprise", | ||
"DESCRIPTION_1":"Manage the application Companies from here. For now clearing the enterprise is not taken into account.", | ||
"DESCRIPTION_2":"Edit selected Enterprise", | ||
"DESCRIPTION_3":"Add a new enterprise.", | ||
"EDITING_ENTERPRISE":"Editing enterprise", | ||
"TITLE":"Enterprise Management"}} | ||
{ | ||
"ENTERPRISE": { | ||
"ADD_ENTERPRISE" : "Add Enterprise.", | ||
"ALL_ENTERPRISES" : "All Enterprises", | ||
"CONFIGURATION_ENTERPRISE" : "Configuration Enterprise", | ||
"DESCRIPTION_1" : "Manage the application Companies from here. For now clearing the enterprise is not taken into account.", | ||
"DESCRIPTION_2" : "Edit selected enterprise", | ||
"DESCRIPTION_3" : "Add a new enterprise.", | ||
"EDITING_ENTERPRISE" : "Editing enterprise", | ||
"TITLE" : "Enterprise Management", | ||
"SETTINGS" : { | ||
"TITLE" : "Enterprise Settings", | ||
"ENABLE_PRICE_LOCK_LABEL" : "Lock Price Changes for Patient Invoicing", | ||
"ENABLE_PRICE_LOCK_HELP_TEXT" : "Enabling this feature will disallow users from modifying the prices of inventory items in the Patient Invoice module." | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,8 +1,17 @@ | ||
{"ENTERPRISE":{"ADD_ENTERPRISE":"Ajouter entreprise", | ||
"ALL_ENTERPRISES":"Tous les entriprises", | ||
"CONFIGURATION_ENTERPRISE":"Configuration entreprise", | ||
"DESCRIPTION_1":"Gerer les entreprises de l'application A partir d'ici. Pour l'instant effacement de l'entrerpise n'est pas prise en compte.", | ||
"DESCRIPTION_2":"Modifier l'enterprise sélectionner", | ||
"DESCRIPTION_3":"Ajouter une nouvelle entreprises", | ||
"EDITING_ENTERPRISE":"Edition entreprise", | ||
"TITLE":"Gestion des entreprises"}} | ||
{ | ||
"ENTERPRISE" : { | ||
"ADD_ENTERPRISE" : "Ajouter entreprise", | ||
"ALL_ENTERPRISES" : "Tous les entriprises", | ||
"CONFIGURATION_ENTERPRISE" : "Configuration entreprise", | ||
"DESCRIPTION_1" : "Gerer les entreprises de l'application A partir d'ici. Pour l'instant effacement de l'entrerpise n'est pas prise en compte.", | ||
"DESCRIPTION_2" : "Modifier l'enterprise sélectionner", | ||
"DESCRIPTION_3" : "Ajouter une nouvelle entreprises", | ||
"EDITING_ENTERPRISE" : "Edition entreprise", | ||
"TITLE" : "Gestion des entreprises", | ||
"SETTINGS" : { | ||
"TITLE" : "Parametres de l'Enterprise", | ||
"ENABLE_PRICE_LOCK_LABEL" : "Verrouiller les changements de prix pour la facturation des patients", | ||
"ENABLE_PRICE_LOCK_HELP_TEXT" : "L'activation de cette fonctionnalité empêchera les utilisateurs de modifier les prix des articles en stock dans le module Facturation de Patients." | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,24 +1,30 @@ | ||
angular.module('bhima.components') | ||
.component('bhYesNoRadios', { | ||
bindings : { | ||
defaultValue : '@?', | ||
value : '=', | ||
label : '@?', | ||
value : '<', | ||
label : '@', | ||
helpText : '@?', | ||
onChangeCallback : '&', | ||
}, | ||
templateUrl : 'modules/templates/bhYesNoRadios.tmpl.html', | ||
controller : YesNoRadio, | ||
controller : YesNoRadioController, | ||
}); | ||
|
||
function YesNoRadio() { | ||
/** | ||
* @function YesNoRadioController | ||
* | ||
* @description | ||
* This component makes yes/no options a bit easier to navigate. | ||
*/ | ||
function YesNoRadioController() { | ||
const $ctrl = this; | ||
$ctrl.$onInit = function onInit() { | ||
$ctrl.onChangeCallback = $ctrl.onChangeCallback; | ||
$ctrl.defaultValue = $ctrl.defaultValue; | ||
$ctrl.value = ($ctrl.defaultValue) ? 1 : 0; | ||
$ctrl.label = $ctrl.label; | ||
$ctrl.helpText = $ctrl.helpText; | ||
|
||
$ctrl.$onInit = () => { | ||
$ctrl.value = Number.parseInt($ctrl.value, 10); | ||
$ctrl.onChangeCallback = $ctrl.onChangeCallback || angular.noop; | ||
}; | ||
|
||
$ctrl.onChange = (value) => { | ||
$ctrl.onChangeCallback({ value }); | ||
}; | ||
} |
Oops, something went wrong.