Skip to content
Snippets Groups Projects
Verified Commit c2501602 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #9686 connect action v2 with list v2

parent d72a20b3
No related branches found
No related tags found
No related merge requests found
......@@ -246,11 +246,7 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module,
$frm_str .= '<i onmouseover="this.style.cursor=\'pointer\';" ';
$frm_str .= 'onclick="$j.ajax({url :\'index.php?display=true&dir=actions&page=docLocker\', type : \'POST\',data : {\'AJAX_CALL\': true, \'unlock\': true, \'res_id\': '.$res_id.'}, success: function (answer) { ';
$frm_str .= 'destroyModal(\'modal_'.$id_action.'\');triggerAngular(\'#/basketList/users/21/groups/2/baskets/9\');';
//$frm_str .= 'window.location.href=window.location.href.replace(\'&directLinkToAction\', \'\');} });var tmp_bask=$(\'baskets\');';
//$frm_str .= 'if (tmp_bask){tmp_bask.style.visibility=\'visible\';}var tmp_ent =$(\'entity\');';
//$frm_str .= 'if (tmp_ent){tmp_ent.style.visibility=\'visible\';} var tmp_cat =$(\'category\');';
//$frm_str .= 'if (tmp_cat){tmp_cat.style.visibility=\'visible\';}destroyModal(\'modal_'.$id_action.'\');reinit();"';
$frm_str .= 'destroyModal(\'modal_'.$id_action.'\');triggerAngular(\'#/basketList/users/'.$_SESSION['urlV2Basket']['userId'].'/groups/'.$_SESSION['urlV2Basket']['groupIdSer'].'/baskets/'.$_SESSION['urlV2Basket']['basketId'].'\');';
$frm_str .= ' }});"';
$frm_str .= ' class="fa fa-times-circle fa-2x closeModale" title="'._CLOSE.'"/>';
......
......@@ -281,13 +281,11 @@ function get_form_txt($values, $path_manage_action, $id_action, $table, $module,
$frm_str .= '</div>';
$frm_str .= '</div>';
$frm_str .= '<i onmouseover="this.style.cursor=\'pointer\';" '
.'onclick="new Ajax.Request(\''.$_SESSION['config']['businessappurl']
.'index.php?display=true&dir=actions&page=docLocker\',{ method:\'post\', parameters: {\'AJAX_CALL\': true, \'unlock\': true, \'res_id\': '
.functions::xssafe($res_id).'}, onSuccess: function(answer){window.location.href=\''
.$_SESSION['config']['businessappurl'].'index.php?page=view_baskets&module=basket&baskets='
.$_SESSION['current_basket']['id'].'\';} });$j(\'#baskets\').css(\'visibility\',\'visible\');destroyModal(\'modal_'.$id_action.'\');reinit();"'
.' class="fa fa-times-circle fa-2x closeModale" title="'._CLOSE.'"/>';
$frm_str .= '<i onmouseover="this.style.cursor=\'pointer\';" ';
$frm_str .= 'onclick="$j.ajax({url :\'index.php?display=true&dir=actions&page=docLocker\', type : \'POST\',data : {\'AJAX_CALL\': true, \'unlock\': true, \'res_id\': '.$res_id.'}, success: function (answer) { ';
$frm_str .= 'destroyModal(\'modal_'.$id_action.'\');triggerAngular(\'#/basketList/users/'.$_SESSION['urlV2Basket']['userId'].'/groups/'.$_SESSION['urlV2Basket']['groupIdSer'].'/baskets/'.$_SESSION['urlV2Basket']['basketId'].'\');';
$frm_str .= ' }});"';
$frm_str .=' class="fa fa-times-circle fa-2x closeModale" title="'._CLOSE.'"/>';
$frm_str .= '</i>';
//PART LEFT
......
......@@ -17,6 +17,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_REDIRECTION</LABEL>
<NAME>redirect</NAME>
<DESC>_REDIRECTION_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>entities</MODULE>
<KEYWORD>redirect</KEYWORD>
......@@ -27,6 +28,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_PUT_IN_COPY</LABEL>
<NAME>put_in_copy</NAME>
<DESC>_PUT_IN_COPY_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>entities</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -62,6 +64,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_PROCESS_ACTION</LABEL>
<NAME>process</NAME>
<DESC>_PROCESS_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -74,6 +77,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_INDEX_FILE</LABEL>
<NAME>index_mlb</NAME>
<DESC>_INDEX_FILE_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<KEYWORD>indexing</KEYWORD>
......@@ -87,6 +91,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_VALIDATE_QUALIF</LABEL>
<NAME>validate_mail</NAME>
<DESC>_VALIDATE_QUALIF_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -99,6 +104,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_VIEW_DOC</LABEL>
<NAME>view</NAME>
<DESC>_VIEW_DOC_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -124,6 +130,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_SET_PERSISTENT_MODE_ON</LABEL>
<NAME>set_persistent_mode_on</NAME>
<DESC>_SET_PERSISTENT_MODE_ON_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -136,6 +143,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_SET_PERSISTENT_MODE_OFF</LABEL>
<NAME>set_persistent_mode_off</NAME>
<DESC>_SET_PERSISTENT_MODE_OFF_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -148,6 +156,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_MARK_AS_READ</LABEL>
<NAME>mark_as_read</NAME>
<DESC>_MARK_AS_READ_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -159,6 +168,7 @@ An action page is described in a ACTIONPAGE tag :
<ID>sendFileWS</ID>
<LABEL>_SEND_FILE_WS</LABEL>
<NAME>sendFileWS</NAME>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -170,6 +180,7 @@ An action page is described in a ACTIONPAGE tag :
<ID>sendDataWS</ID>
<LABEL>_SEND_DATA_WS</LABEL>
<NAME>sendDataWS</NAME>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -181,6 +192,7 @@ An action page is described in a ACTIONPAGE tag :
<ID>sendToExternalSignatureBook</ID>
<LABEL>_SEND_TO_EXTERNAL_SB</LABEL>
<NAME>sendToExternalSignatureBook</NAME>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -193,6 +205,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_CLOSE_MAIL_AND_INDEX</LABEL>
<NAME>close_mail_and_index</NAME>
<DESC>_CLOSE_MAIL_AND_INDEX_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -205,6 +218,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_CLOSE_MAIL_WITH_ATTACHMENT</LABEL>
<NAME>close_mail_with_attachment</NAME>
<DESC>_CLOSE_MAIL_WITH_ATTACHMENT_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -217,6 +231,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_SEND_ATTACHMENTS_TO_CONTACT</LABEL>
<NAME>send_attachments_to_contact</NAME>
<DESC>_SEND_ATTACHMENTS_TO_CONTACT_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -229,6 +244,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_SEND_TO_CONTACT_WITH_MANDATORY_ATTACHMENT</LABEL>
<NAME>send_to_contact_with_mandatory_attachment</NAME>
<DESC>_SEND_TO_CONTACT_WITH_MANDATORY_ATTACHMENT_DESC</DESC>
<component>v1Action</component>
<ORIGIN>apps</ORIGIN>
<MODULE></MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -241,6 +257,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_VISA_MAIL</LABEL>
<NAME>visa_mail</NAME>
<DESC>_VISA_MAIL_DESC</DESC>
<component>signatureBookAction</component>
<ORIGIN>module</ORIGIN>
<MODULE>visa</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -253,6 +270,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_PROCEED_WORKFLOW</LABEL>
<NAME>visa_workflow</NAME>
<DESC>_PROCEED_WORKFLOW_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>visa</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -265,6 +283,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_INTERRUPT_WORKFLOW</LABEL>
<NAME>interrupt_visa</NAME>
<DESC>_INTERRUPT_WORKFLOW_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>visa</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -277,6 +296,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_REJECTION_WORKFLOW_REDACTOR</LABEL>
<NAME>rejection_visa_redactor</NAME>
<DESC>_REJECTION_WORKFLOW_REDACTOR_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>visa</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -289,6 +309,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_REJECTION_WORKFLOW_PREVIOUS</LABEL>
<NAME>rejection_visa_previous</NAME>
<DESC>_REJECTION_WORKFLOW_PREVIOUS_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>visa</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -301,6 +322,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_REDIRECT_WORKFLOW_ENTITY</LABEL>
<NAME>redirect_visa_entity</NAME>
<DESC>_REDIRECT_WORKFLOW_ENTITY_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>visa</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -313,6 +335,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_SEND_TO_VISA</LABEL>
<NAME>send_to_visa</NAME>
<DESC>_SEND_TO_VISA_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>visa</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -325,6 +348,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_SEND_SIGNED_DOCS</LABEL>
<NAME>send_signed_docs</NAME>
<DESC>_SEND_SIGNED_DOCS_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>visa</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -337,6 +361,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_SEND_DOCS_TO_RECOMMENDATION</LABEL>
<NAME>send_docs_to_recommendation</NAME>
<DESC>_SEND_DOCS_TO_RECOMMENDATION_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>avis</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -349,6 +374,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_VALIDATE_RECOMMENDATION</LABEL>
<NAME>validate_recommendation</NAME>
<DESC>_VALIDATE_RECOMMENDATION_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>avis</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -361,6 +387,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_SEND_TO_AVIS_WF</LABEL>
<NAME>send_to_avis</NAME>
<DESC>_SEND_TO_AVIS_WF_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>avis</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -373,6 +400,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_PROCEED_WORKFLOW_AVIS</LABEL>
<NAME>avis_workflow</NAME>
<DESC>_PROCEED_WORKFLOW_AVIS_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>avis</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -385,6 +413,7 @@ An action page is described in a ACTIONPAGE tag :
<LABEL>_PROCEED_WORKFLOW_AVIS_SIMPLE</LABEL>
<NAME>avis_simple</NAME>
<DESC>_PROCEED_WORKFLOW_AVIS_SIMPLE_DESC</DESC>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>avis</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -396,6 +425,7 @@ An action page is described in a ACTIONPAGE tag :
<ID>export_seda</ID>
<LABEL>_EXPORT_SEDA</LABEL>
<NAME>export_seda</NAME>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>export_seda</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -407,6 +437,7 @@ An action page is described in a ACTIONPAGE tag :
<ID>check_acknowledgement</ID>
<LABEL>_CHECK_ACKNOWLEDGEMENT</LABEL>
<NAME>check_acknowledgement</NAME>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>export_seda</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -418,6 +449,7 @@ An action page is described in a ACTIONPAGE tag :
<ID>check_reply</ID>
<LABEL>_CHECK_REPLY</LABEL>
<NAME>check_reply</NAME>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>export_seda</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -429,6 +461,7 @@ An action page is described in a ACTIONPAGE tag :
<ID>purge_letter</ID>
<LABEL>_PURGE_LETTER</LABEL>
<NAME>purge_letter</NAME>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>export_seda</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......@@ -440,6 +473,7 @@ An action page is described in a ACTIONPAGE tag :
<ID>reset_letter</ID>
<LABEL>_RESET_LETTER</LABEL>
<NAME>reset_letter</NAME>
<component>v1Action</component>
<ORIGIN>module</ORIGIN>
<MODULE>export_seda</MODULE>
<FLAG_CREATE>false</FLAG_CREATE>
......
......@@ -365,9 +365,15 @@ if ($_SESSION['cpt_info_basket'] > 0) {
}
if (!empty($_GET['resId']) && !empty($_GET['defaultAction']) && ($_SESSION['alreadyDefaultAction'] == false || !empty($_GET['groupIdSer']))) {
$_SESSION['alreadyDefaultAction'] = true;
$_SESSION['urlV2Basket'] = $_GET;
echo '<script language="javascript">';
echo 'setTimeout(function(){validForm(\'page\', \''.$_GET['resId'].'\', \''.$_GET['defaultAction'].'\');}, 800);';
if (!empty($_GET['signatureBookMode'])) {
echo 'setTimeout(function(){islockForSignatureBook(\''.$_GET['resId'].'\', \''.$_GET['baskets'].'\', \'RESPONSABLE\');}, 400);';
} else {
echo 'setTimeout(function(){validForm(\'page\', \''.$_GET['resId'].'\', \''.$_GET['defaultAction'].'\');}, 400);';
}
echo '</script>';
} else {
$_SESSION['alreadyDefaultAction'] = false;
......
......@@ -8,6 +8,7 @@ import { ConfirmActionComponent } from './confirm-action/confirm-action.componen
import { CloseMailActionComponent } from './close-mail-action/close-mail-action.component';
import { UpdateDepartureDateActionComponent } from './update-departure-date-action/update-departure-date-action.component';
import { ProcessActionComponent } from './process-action/process-action.component';
import { Router } from '@angular/router';
@Component({
selector: 'app-actions-list',
......@@ -38,7 +39,7 @@ export class ActionsListComponent implements OnInit {
@Input('contextMode') contextMode: boolean;
@Input('currentBasketInfo') currentBasketInfo: any;
constructor(public http: HttpClient, private notify: NotificationService, public dialog: MatDialog) { }
constructor(public http: HttpClient, private notify: NotificationService, public dialog: MatDialog, private router: Router) { }
ngOnInit(): void { }
......@@ -79,6 +80,7 @@ export class ActionsListComponent implements OnInit {
}
catch (error) {
console.log(error);
console.log(action);
alert(this.lang.actionNotExist);
}
this.loading = false;
......@@ -148,8 +150,9 @@ export class ActionsListComponent implements OnInit {
});
}
processAction() {
// CALL GENERIC ACTION V1
v1Action() {
location.hash = "";
window.location.href = 'index.php?page=view_baskets&module=basket&baskets='+this.currentBasketInfo.basket_id+'&basketId='+this.currentBasketInfo.basketId+'&resId='+this.arrRes[0]+'&userId='+this.currentBasketInfo.ownerId+'&groupIdSer='+this.currentBasketInfo.groupId+'&defaultAction='+this.currentAction.id;
// WHEN V2
/*this.dialog.open(ProcessActionComponent, {
......@@ -163,6 +166,13 @@ export class ActionsListComponent implements OnInit {
}
});*/
}
// CALL SIGNATUREBOOK WITH V1 METHOD
signatureBookAction() {
location.hash = "";
window.location.href = 'index.php?page=view_baskets&module=basket&baskets='+this.currentBasketInfo.basket_id+'&basketId='+this.currentBasketInfo.basketId+'&resId='+this.arrRes[0]+'&userId='+this.currentBasketInfo.ownerId+'&groupIdSer='+this.currentBasketInfo.groupId+'&defaultAction='+this.currentAction.id+'&signatureBookMode=true';
}
////
endAction() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment