branch develop updated (e8d3a93 -> 78af899)
This is an automated email from the git hooks/post-receive script. New change to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git from e8d3a93 fixes #9097 créer la colonne "Imprimé Le" new fa12f50 refs #9097 ajout de la migration sqlserver new e3f2f18 fixes #9095 L'impression doit mettre à jour le champ "Pris par" (sans l'ouvris, via le clic droit) sauf si la demande est déjà prise. new 78af899 fixes #9095 The 3 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference. Detailed log of new commits: commit 78af899c48661abd74395eaff01abf006af489a4 Merge: e8d3a93 e3f2f18 Author: Kevin Morin <morin@codelutin.com> Date: Tue Mar 14 10:52:19 2017 +0100 fixes #9095 commit e3f2f18e7b49c1117c95db6e7a2269497ff519c1 Author: Kevin Morin <morin@codelutin.com> Date: Tue Mar 14 10:51:48 2017 +0100 fixes #9095 L'impression doit mettre à jour le champ "Pris par" (sans l'ouvris, via le clic droit) sauf si la demande est déjà prise. commit fa12f5018d917e61bebab9e62bae98bddd293e67 Author: Kevin Morin <morin@codelutin.com> Date: Tue Mar 14 10:44:43 2017 +0100 refs #9097 ajout de la migration sqlserver Summary of changes: faxtomail-persistence/src/main/xmi/faxtomail.zargo | Bin 33796 -> 33882 bytes ...13_2__add_printActionEqualTakeOnlyIfNotTaken.sql | 4 ++++ .../V2_2_3_170313_1__add_last_printing_user.sql | 3 ++- ...13_2__add_printActionEqualTakeOnlyIfNotTaken.sql | 6 ++++++ .../swing/actions/PrintOnDefaultPrinterAction.java | 6 +++++- .../swing/content/demande/DemandeListUIHandler.java | 7 +++++++ .../print/AttachmentToPrintChooserUIHandler.java | 1 + .../WEB-INF/content/admin/configuration-input.jsp | 17 +++++++++++++++++ .../src/main/webapp/js/configuration.js | 4 ++++ 9 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 faxtomail-service/src/main/resources/db/migration/h2/V2_2_3_170313_2__add_printActionEqualTakeOnlyIfNotTaken.sql copy faxtomail-service/src/main/resources/db/migration/{h2 => sqlserver}/V2_2_3_170313_1__add_last_printing_user.sql (82%) create mode 100644 faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_3_170313_2__add_printActionEqualTakeOnlyIfNotTaken.sql -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit fa12f5018d917e61bebab9e62bae98bddd293e67 Author: Kevin Morin <morin@codelutin.com> Date: Tue Mar 14 10:44:43 2017 +0100 refs #9097 ajout de la migration sqlserver --- .../V2_2_3_170313_1__add_last_printing_user.sql | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_3_170313_1__add_last_printing_user.sql b/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_3_170313_1__add_last_printing_user.sql new file mode 100644 index 0000000..b268e72 --- /dev/null +++ b/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_3_170313_1__add_last_printing_user.sql @@ -0,0 +1,19 @@ +-- add last printing user + +alter table email add lastPrintingUser varchar(255); + +alter table email + add constraint FK_I8WXUJ77ETK21ME0JC939HBEO_INDEX_3 + foreign key (lastPrintingUser) + references faxtomailuser; +GO + +update email set email.lastPrintingUser = (select h.faxtomailuser + from history h + where h.email = email.topiaId + and h.type = 'PRINTING' + and h.email not in ( + select h2.email from history h2 + where (h2.type='TRANSMISSION' OR h2.type='PRINTING') and h2.modificationDate > h.modificationDate + ) +) where archiveDate is null; \ No newline at end of file -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit e3f2f18e7b49c1117c95db6e7a2269497ff519c1 Author: Kevin Morin <morin@codelutin.com> Date: Tue Mar 14 10:51:48 2017 +0100 fixes #9095 L'impression doit mettre à jour le champ "Pris par" (sans l'ouvris, via le clic droit) sauf si la demande est déjà prise. --- faxtomail-persistence/src/main/xmi/faxtomail.zargo | Bin 33796 -> 33882 bytes ...13_2__add_printActionEqualTakeOnlyIfNotTaken.sql | 4 ++++ ...13_2__add_printActionEqualTakeOnlyIfNotTaken.sql | 6 ++++++ .../swing/actions/PrintOnDefaultPrinterAction.java | 6 +++++- .../swing/content/demande/DemandeListUIHandler.java | 7 +++++++ .../print/AttachmentToPrintChooserUIHandler.java | 1 + .../WEB-INF/content/admin/configuration-input.jsp | 17 +++++++++++++++++ .../src/main/webapp/js/configuration.js | 4 ++++ 8 files changed, 44 insertions(+), 1 deletion(-) diff --git a/faxtomail-persistence/src/main/xmi/faxtomail.zargo b/faxtomail-persistence/src/main/xmi/faxtomail.zargo index 5268bc7..1d9a086 100644 Binary files a/faxtomail-persistence/src/main/xmi/faxtomail.zargo and b/faxtomail-persistence/src/main/xmi/faxtomail.zargo differ diff --git a/faxtomail-service/src/main/resources/db/migration/h2/V2_2_3_170313_2__add_printActionEqualTakeOnlyIfNotTaken.sql b/faxtomail-service/src/main/resources/db/migration/h2/V2_2_3_170313_2__add_printActionEqualTakeOnlyIfNotTaken.sql new file mode 100644 index 0000000..b1f5687 --- /dev/null +++ b/faxtomail-service/src/main/resources/db/migration/h2/V2_2_3_170313_2__add_printActionEqualTakeOnlyIfNotTaken.sql @@ -0,0 +1,4 @@ +-- add printActionEqualTakeOnlyIfNotTaken + +alter table mailfolder add printActionEqualTakeOnlyIfNotTaken boolean; +update mailfolder set printActionEqualTakeOnlyIfNotTaken = 'f' where parent is null; \ No newline at end of file diff --git a/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_3_170313_2__add_printActionEqualTakeOnlyIfNotTaken.sql b/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_3_170313_2__add_printActionEqualTakeOnlyIfNotTaken.sql new file mode 100644 index 0000000..f7a105f --- /dev/null +++ b/faxtomail-service/src/main/resources/db/migration/sqlserver/V2_2_3_170313_2__add_printActionEqualTakeOnlyIfNotTaken.sql @@ -0,0 +1,6 @@ +-- add printActionEqualTakeOnlyIfNotTaken + +alter table mailfolder add printActionEqualTakeOnlyIfNotTaken bit; +GO +update mailfolder set printActionEqualTakeOnlyIfNotTaken = 1 where parent is null; +GO \ No newline at end of file diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/PrintOnDefaultPrinterAction.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/PrintOnDefaultPrinterAction.java index 154c72f..14c7c48 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/PrintOnDefaultPrinterAction.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/actions/PrintOnDefaultPrinterAction.java @@ -56,17 +56,20 @@ public class PrintOnDefaultPrinterAction extends AbstractFaxToMailAction { protected Multimap<DemandeUIModel, AttachmentFile> attachmentsToPrintByDemand; protected boolean take; + protected boolean takeOnlyIfNotTaken; protected boolean printDemandDetails; protected List<DemandeUIModel> notPrintableDemands; public PrintOnDefaultPrinterAction(AbstractFaxToMailUIHandler handler, Multimap<DemandeUIModel, AttachmentFile> attachmentsToPrintByDemand, boolean take, + boolean takeOnlyIfNotTaken, boolean printDemandDetails) { super(handler, false); this.attachmentsToPrintByDemand = attachmentsToPrintByDemand; this.take = take; + this.takeOnlyIfNotTaken = takeOnlyIfNotTaken; this.printDemandDetails = printDemandDetails; setActionDescription(t("faxtomail.action.print.tip")); @@ -97,7 +100,7 @@ public class PrintOnDefaultPrinterAction extends AbstractFaxToMailAction { notPrintableDemands.add(demandeUIModel); } else { - if (take) { + if (take && (demandeUIModel.getTakenBy() == null || !takeOnlyIfNotTaken)) { demandeUIModel.setTakenBy(currentUser); } @@ -137,6 +140,7 @@ public class PrintOnDefaultPrinterAction extends AbstractFaxToMailAction { printedFiles.toArray(new String[printedFiles.size()])); printedFileNb += printedFiles.size(); demandeUIModel.setHistory(email.getHistory()); + demandeUIModel.setLastPrintingUser(email.getLastPrintingUser()); } } diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java index 216dd64..85be89e 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/demande/DemandeListUIHandler.java @@ -788,6 +788,12 @@ public class DemandeListUIHandler extends AbstractFaxToMailDemandListHandler<Dem } boolean take = Boolean.TRUE.equals(selectedFolder.getPrintActionEqualTakeAction()); + selectedFolder = model.getSelectedFolder(); + while (selectedFolder.getParent() != null && selectedFolder.getPrintActionEqualTakeOnlyIfNotTaken() == null) { + selectedFolder = selectedFolder.getParent(); + } + boolean takeOnlyIfNotTaken = Boolean.TRUE.equals(selectedFolder.getPrintActionEqualTakeOnlyIfNotTaken()); + Multimap<DemandeUIModel, AttachmentFile> attachmentToPrints = HashMultimap.create(); for (DemandeUIModel demandeUIModel : model.getSelectedEmails()) { @@ -814,6 +820,7 @@ public class DemandeListUIHandler extends AbstractFaxToMailDemandListHandler<Dem PrintOnDefaultPrinterAction action = new PrintOnDefaultPrinterAction(this, attachmentToPrints, take, + takeOnlyIfNotTaken, true); getContext().getActionEngine().runAction(action); } diff --git a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java index aafb86c..d31e34f 100644 --- a/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java +++ b/faxtomail-ui-swing/src/main/java/com/franciaflex/faxtomail/ui/swing/content/print/AttachmentToPrintChooserUIHandler.java @@ -157,6 +157,7 @@ public class AttachmentToPrintChooserUIHandler extends AbstractFaxToMailUIHandle PrintOnDefaultPrinterAction action = new PrintOnDefaultPrinterAction(this, attachmentToPrints, false, + false, false) { @Override diff --git a/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp b/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp index e05a7b5..637a905 100644 --- a/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp +++ b/faxtomail-ui-web/src/main/webapp/WEB-INF/content/admin/configuration-input.jsp @@ -471,6 +471,23 @@ ({{parentScopeValues.printActionEqualTakeAction ? 'Oui' : 'Non'}}) </label> </div> + + <div class="form-group" ng-if="selectedMailFolder.printActionEqualTakeAction || selectedMailFolder.printActionEqualTakeAction == null && parentScopeValues.printActionEqualTakeAction"> + <label class="control-label">Seulement si l'élément n'est pas pris ?</label><br /> + <label class="radio-inline"> + <input type="radio" + ng-model="selectedMailFolder.printActionEqualTakeOnlyIfNotTaken" ng-value="true"> oui + </label> + <label class="radio-inline"> + <input type="radio" + ng-model="selectedMailFolder.printActionEqualTakeOnlyIfNotTaken" ng-value="false"> non + </label> + <label class="radio-inline" ng-if="selectedMailFolder.$parent"> + <input type="radio" + ng-model="selectedMailFolder.printActionEqualTakeOnlyIfNotTaken" ng-value="undefined"> hériter du dossier parent + ({{parentScopeValues.printActionEqualTakeOnlyIfNotTaken ? 'Oui' : 'Non'}}) + </label> + </div> <div class="form-group"> <label class="control-label">Colorer les demandes invalides dans la listes ?</label><br /> diff --git a/faxtomail-ui-web/src/main/webapp/js/configuration.js b/faxtomail-ui-web/src/main/webapp/js/configuration.js index 4c572d0..2d9642f 100644 --- a/faxtomail-ui-web/src/main/webapp/js/configuration.js +++ b/faxtomail-ui-web/src/main/webapp/js/configuration.js @@ -794,6 +794,7 @@ ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$windo $scope.selectedMailFolder.colorizeInvalidDemands = $scope.selectedMailFolder.colorizeInvalidDemands || false; $scope.selectedMailFolder.openAttachmentReportNoTaken = $scope.selectedMailFolder.openAttachmentReportNoTaken || false; $scope.selectedMailFolder.printActionEqualTakeAction = $scope.selectedMailFolder.printActionEqualTakeAction || false; + $scope.selectedMailFolder.printActionEqualTakeOnlyIfNotTaken = $scope.selectedMailFolder.printActionEqualTakeOnlyIfNotTaken || false; $scope.selectedMailFolder.lockedDemandsOpenableInReadOnly = $scope.selectedMailFolder.lockedDemandsOpenableInReadOnly || false; $scope.selectedMailFolder.ediTransfer = $scope.selectedMailFolder.ediTransfer|| false; } @@ -882,6 +883,9 @@ ConfigurationModule.controller('ConfigurationTreeController', ['$scope', '$windo if (angular.isUndefined($scope.parentScopeValues.printActionEqualTakeAction)) { $scope.parentScopeValues.printActionEqualTakeAction = folder.printActionEqualTakeAction; } + if (angular.isUndefined($scope.parentScopeValues.printActionEqualTakeOnlyIfNotTaken)) { + $scope.parentScopeValues.printActionEqualTakeOnlyIfNotTaken = folder.printActionEqualTakeOnlyIfNotTaken; + } if (angular.isUndefined($scope.parentScopeValues.lockedDemandsOpenableInReadOnly)) { $scope.parentScopeValues.lockedDemandsOpenableInReadOnly = folder.lockedDemandsOpenableInReadOnly; } -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository faxtomail. See https://gitlab.nuiton.org/codelutin/faxtomail.git commit 78af899c48661abd74395eaff01abf006af489a4 Merge: e8d3a93 e3f2f18 Author: Kevin Morin <morin@codelutin.com> Date: Tue Mar 14 10:52:19 2017 +0100 fixes #9095 faxtomail-persistence/src/main/xmi/faxtomail.zargo | Bin 33796 -> 33882 bytes ...13_2__add_printActionEqualTakeOnlyIfNotTaken.sql | 4 ++++ .../V2_2_3_170313_1__add_last_printing_user.sql | 19 +++++++++++++++++++ ...13_2__add_printActionEqualTakeOnlyIfNotTaken.sql | 6 ++++++ .../swing/actions/PrintOnDefaultPrinterAction.java | 6 +++++- .../swing/content/demande/DemandeListUIHandler.java | 7 +++++++ .../print/AttachmentToPrintChooserUIHandler.java | 1 + .../WEB-INF/content/admin/configuration-input.jsp | 17 +++++++++++++++++ .../src/main/webapp/js/configuration.js | 4 ++++ 9 files changed, 63 insertions(+), 1 deletion(-) -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.
participants (1)
-
codelutin.com scm