Skip to content
Snippets Groups Projects
Commit e7c9e1ea authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FEAT #13049 TIME 0:10 created new action

parent 5f5e2974
No related branches found
No related tags found
No related merge requests found
...@@ -422,4 +422,17 @@ An action page is described in a ACTIONPAGE tag : ...@@ -422,4 +422,17 @@ An action page is described in a ACTIONPAGE tag :
<MODULE></MODULE> <MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE> <FLAG_CREATE>false</FLAG_CREATE>
</ACTIONPAGE> </ACTIONPAGE>
<ACTIONPAGE>
<ID>close_mail_with_fields</ID>
<LABEL>_CLOSE_MAIL_WITH_FIELDS</LABEL>
<NAME>close_mail_with_fields</NAME>
<DESC>_CLOSE_MAIL_WITH_FIELDS_DESC</DESC>
<component>closeWithFieldsAction</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
<COLLECTIONS>
<COLL_ID>letterbox_coll</COLL_ID>
</COLLECTIONS>
</ACTIONPAGE>
</ROOT> </ROOT>
...@@ -41,32 +41,33 @@ class ActionMethodController ...@@ -41,32 +41,33 @@ class ActionMethodController
use ExternalSignatoryBookTrait; use ExternalSignatoryBookTrait;
const COMPONENTS_ACTIONS = [ const COMPONENTS_ACTIONS = [
'confirmAction' => null, 'confirmAction' => null,
'closeMailAction' => 'closeMailAction', 'closeMailAction' => 'closeMailAction',
'closeMailWithAttachmentsOrNotesAction' => 'closeMailWithAttachmentsOrNotesAction', 'closeMailWithAttachmentsOrNotesAction' => 'closeMailWithAttachmentsOrNotesAction',
'redirectAction' => 'redirect', 'redirectAction' => 'redirect',
'closeAndIndexAction' => 'closeAndIndexAction', 'closeAndIndexAction' => 'closeAndIndexAction',
'updateDepartureDateAction' => 'updateDepartureDateAction', 'updateDepartureDateAction' => 'updateDepartureDateAction',
'enabledBasketPersistenceAction' => 'enabledBasketPersistenceAction', 'enabledBasketPersistenceAction' => 'enabledBasketPersistenceAction',
'disabledBasketPersistenceAction' => 'disabledBasketPersistenceAction', 'disabledBasketPersistenceAction' => 'disabledBasketPersistenceAction',
'resMarkAsReadAction' => 'resMarkAsReadAction', 'resMarkAsReadAction' => 'resMarkAsReadAction',
'sendExternalSignatoryBookAction' => 'sendExternalSignatoryBookAction', 'sendExternalSignatoryBookAction' => 'sendExternalSignatoryBookAction',
'sendExternalNoteBookAction' => 'sendExternalNoteBookAction', 'sendExternalNoteBookAction' => 'sendExternalNoteBookAction',
'createAcknowledgementReceiptsAction' => 'createAcknowledgementReceipts', 'createAcknowledgementReceiptsAction' => 'createAcknowledgementReceipts',
'updateAcknowledgementSendDateAction' => 'updateAcknowledgementSendDateAction', 'updateAcknowledgementSendDateAction' => 'updateAcknowledgementSendDateAction',
'sendShippingAction' => 'createMailevaShippings', 'sendShippingAction' => 'createMailevaShippings',
'sendSignatureBookAction' => 'sendSignatureBook', 'sendSignatureBookAction' => 'sendSignatureBook',
'continueVisaCircuitAction' => 'continueVisaCircuit', 'continueVisaCircuitAction' => 'continueVisaCircuit',
'redirectInitiatorEntityAction' => 'redirectInitiatorEntityAction', 'redirectInitiatorEntityAction' => 'redirectInitiatorEntityAction',
'rejectVisaBackToPreviousAction' => 'rejectVisaBackToPrevious', 'rejectVisaBackToPreviousAction' => 'rejectVisaBackToPrevious',
'resetVisaAction' => 'resetVisa', 'resetVisaAction' => 'resetVisa',
'interruptVisaAction' => 'interruptVisa', 'interruptVisaAction' => 'interruptVisa',
'sendToParallelOpinion' => 'sendToParallelOpinion', 'sendToParallelOpinion' => 'sendToParallelOpinion',
'sendToOpinionCircuitAction' => 'sendToOpinionCircuit', 'sendToOpinionCircuitAction' => 'sendToOpinionCircuit',
'continueOpinionCircuitAction' => 'continueOpinionCircuit', 'continueOpinionCircuitAction' => 'continueOpinionCircuit',
'giveOpinionParallelAction' => 'giveOpinionParallel', 'giveOpinionParallelAction' => 'giveOpinionParallel',
'validateParallelOpinionDiffusionAction' => 'validateParallelOpinionDiffusion', 'validateParallelOpinionDiffusionAction' => 'validateParallelOpinionDiffusion',
'noConfirmAction' => null 'closeWithFieldsAction' => 'closeWithFields',
'noConfirmAction' => null
]; ];
public static function terminateAction(array $aArgs) public static function terminateAction(array $aArgs)
...@@ -882,4 +883,15 @@ class ActionMethodController ...@@ -882,4 +883,15 @@ class ActionMethodController
return true; return true;
} }
public static function closeWithFields(array $args)
{
ValidatorModel::notEmpty($args, ['resId']);
ValidatorModel::intVal($args, ['resId']);
ValidatorModel::stringType($args, ['note']);
ResModel::update(['set' => ['closing_date' => 'CURRENT_TIMESTAMP'], 'where' => ['res_id = ?', 'closing_date is null'], 'data' => [$args['resId']]]);
return true;
}
} }
...@@ -227,6 +227,8 @@ define('_NO_CONFIRM_DESC', "Perform the action without confirmation"); ...@@ -227,6 +227,8 @@ define('_NO_CONFIRM_DESC', "Perform the action without confirmation");
define('_VIEW_DOC', 'See the mail'); define('_VIEW_DOC', 'See the mail');
define('_CLOSE_MAIL', 'Close a mail'); define('_CLOSE_MAIL', 'Close a mail');
define('_CLOSE_MAIL_DESC', 'Allows you to update the closing date of a mail. ESSENTIAL in order to complete your document workflow.'); define('_CLOSE_MAIL_DESC', 'Allows you to update the closing date of a mail. ESSENTIAL in order to complete your document workflow.');
define('_CLOSE_MAIL_WITH_FIELDS', 'Close a mail with custom fields');
define('_CLOSE_MAIL_WITH_FIELDS_DESC', 'Allows you to update the closing date of a mail. ESSENTIAL in order to complete your document workflow. Chosen fields will be needed to do the action.');
define('_SET_PERSISTENT_MODE_ON', 'Activate the persistence'); define('_SET_PERSISTENT_MODE_ON', 'Activate the persistence');
define('_SET_PERSISTENT_MODE_ON_DESC', 'Keeps a mail in a basket regardless of its state. Insert data in the \'basket_persistent_mode\' table.'); define('_SET_PERSISTENT_MODE_ON_DESC', 'Keeps a mail in a basket regardless of its state. Insert data in the \'basket_persistent_mode\' table.');
define('_SET_PERSISTENT_MODE_OFF', 'Deactivate the persistence'); define('_SET_PERSISTENT_MODE_OFF', 'Deactivate the persistence');
......
...@@ -227,6 +227,8 @@ define('_NO_CONFIRM_DESC', "Effectue l'action sans confirmation"); ...@@ -227,6 +227,8 @@ define('_NO_CONFIRM_DESC', "Effectue l'action sans confirmation");
define('_VIEW_DOC', 'Voir le courrier'); define('_VIEW_DOC', 'Voir le courrier');
define('_CLOSE_MAIL', 'Clôturer un courrier'); define('_CLOSE_MAIL', 'Clôturer un courrier');
define('_CLOSE_MAIL_DESC', 'Permet de mettre à jour la date de clôture d\'un courrier. ESSENTIEL afin de terminer votre workflow de courrier.'); define('_CLOSE_MAIL_DESC', 'Permet de mettre à jour la date de clôture d\'un courrier. ESSENTIEL afin de terminer votre workflow de courrier.');
define('_CLOSE_MAIL_WITH_FIELDS', 'Clôturer un courrier avec des champs personnalisés');
define('_CLOSE_MAIL_WITH_FIELDS_DESC', 'Permet de mettre à jour la date de clôture d\'un courrier. ESSENTIEL afin de terminer votre workflow de courrier. L\'action ne pourra se faire seulement si les champs choisis sont renseignés dans le courrier');
define('_SET_PERSISTENT_MODE_ON', 'Activer la persistance'); define('_SET_PERSISTENT_MODE_ON', 'Activer la persistance');
define('_SET_PERSISTENT_MODE_ON_DESC', 'Permet de conserver un courrier dans une bannette quelque soit son état. Insère la donnée dans la table \'basket_persistent_mode\'.'); define('_SET_PERSISTENT_MODE_ON_DESC', 'Permet de conserver un courrier dans une bannette quelque soit son état. Insère la donnée dans la table \'basket_persistent_mode\'.');
define('_SET_PERSISTENT_MODE_OFF', 'Désactiver la persistance'); define('_SET_PERSISTENT_MODE_OFF', 'Désactiver la persistance');
......
...@@ -228,6 +228,8 @@ define('_NO_CONFIRM_DESC', "Perform the action without confirmation"); //_TO_TRA ...@@ -228,6 +228,8 @@ define('_NO_CONFIRM_DESC', "Perform the action without confirmation"); //_TO_TRA
define('_VIEW_DOC', 'Het brief bekijken'); define('_VIEW_DOC', 'Het brief bekijken');
define('_CLOSE_MAIL', 'Een brief afsluiten'); define('_CLOSE_MAIL', 'Een brief afsluiten');
define('_CLOSE_MAIL_DESC', 'Om de afsluitingsdatum van een brief bij te werken. ESSENTIEEL om uw documentworkflow af te sluiten.'); define('_CLOSE_MAIL_DESC', 'Om de afsluitingsdatum van een brief bij te werken. ESSENTIEEL om uw documentworkflow af te sluiten.');
define('_CLOSE_MAIL_WITH_FIELDS', 'Close a mail with custom fields'); //_TO_TRANSLATE
define('_CLOSE_MAIL_WITH_FIELDS_DESC', 'Allows you to update the closing date of a mail. ESSENTIAL in order to complete your document workflow. Chosen fields will be needed to do the action.'); //_TO_TRANSLATE
define('_SET_PERSISTENT_MODE_ON', 'De persistentie activeren'); define('_SET_PERSISTENT_MODE_ON', 'De persistentie activeren');
define('_SET_PERSISTENT_MODE_ON_DESC', 'Om een biref in een bakje te bewaren ongeacht zijn status. Voegt het gegeven in de tabel \basket_persistent_mode\.'); define('_SET_PERSISTENT_MODE_ON_DESC', 'Om een biref in een bakje te bewaren ongeacht zijn status. Voegt het gegeven in de tabel \basket_persistent_mode\.');
define('_SET_PERSISTENT_MODE_OFF', 'De persistentie uitschakelen'); define('_SET_PERSISTENT_MODE_OFF', 'De persistentie uitschakelen');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment