From a7c14de8a3514de56b72b9ffa27be8a03044b0fb Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Fri, 8 Dec 2023 18:36:08 -0500 Subject: [PATCH] time line contacts --- wrenchboard/src/include/wrenchboard_api.h | 1 + www-api/app/Config/Constants.php | 1 + www-api/app/Controllers/BaseController.php | 2 ++ www-api/app/Controllers/WrenchApi.php | 27 ++++++++++++++++++++++ 4 files changed, 31 insertions(+) diff --git a/wrenchboard/src/include/wrenchboard_api.h b/wrenchboard/src/include/wrenchboard_api.h index baef5cd3..2aeaa3b0 100644 --- a/wrenchboard/src/include/wrenchboard_api.h +++ b/wrenchboard/src/include/wrenchboard_api.h @@ -52,6 +52,7 @@ enum { PARTNER_STRIPE }; #define CONTRACT_EXTEND_TIMELINE 9 #define CONTRACT_NOTIFY_COMPLETE 4 #define CONTRACT_REQUEST_CANCEL 3 +#define CONTRACT_REQUEST_TIMELINE 2 #define CONTRACT_ACCEPT_COMPLETE 5 #define CONTRACT_REJECT_COMPLETE 1 diff --git a/www-api/app/Config/Constants.php b/www-api/app/Config/Constants.php index a1a56502..77718467 100644 --- a/www-api/app/Config/Constants.php +++ b/www-api/app/Config/Constants.php @@ -141,6 +141,7 @@ define('CONTRACT_CANCEL_CONTRACT', 7); define('CONTRACT_EXTEND_TIMELINE', 9); define('CONTRACT_NOTIFY_COMPLETE', 4); define('CONTRACT_REQUEST_CANCEL', 3); +define('CONTRACT_REQUEST_TIMELINE', 2); define('CONTRACT_ACCEPT_COMPLETE', 5); define('CONTRACT_REJECT_COMPLETE', 1); diff --git a/www-api/app/Controllers/BaseController.php b/www-api/app/Controllers/BaseController.php index daebad4a..ac4d75ee 100644 --- a/www-api/app/Controllers/BaseController.php +++ b/www-api/app/Controllers/BaseController.php @@ -286,6 +286,8 @@ abstract class BaseController extends Controller case 'REJECT_COMPLETE': $data['job_action'] = CONTRACT_REJECT_COMPLETE; break; + case 'NOTIFY_REQEXTENT': + $data['job_action'] = CONTRACT_REQUEST_TIMELINE; case 'EXTEND_TIMELINE': $data['job_action'] = CONTRACT_EXTEND_TIMELINE; break; diff --git a/www-api/app/Controllers/WrenchApi.php b/www-api/app/Controllers/WrenchApi.php index 0a9c51b9..cc1f3f2b 100644 --- a/www-api/app/Controllers/WrenchApi.php +++ b/www-api/app/Controllers/WrenchApi.php @@ -17,10 +17,37 @@ class WrenchApi extends BaseController { return []; } + + /* + this.usrData = {action:22010, + member_id: this.sessionDataProviderService.member_id, + uid: this.sessionDataProviderService.member_uid, + sessionid: this.sessionDataProviderService.session , + raw_contacts: contactResult } +"name":{"family":"Higgins","prefix":"","given":"Daniel","suffix":"Jr.","display":"Daniel Higgins Jr.","middle":""}, +"contactId":"AB211C5F-9EC9-429F-9466-B9382FF61035", + */ + private function processContacts( $in ){ + log_message('critical', "************************ cachecontacts 0001 ".serialize($in)); + + $inx =[]; + $inx["member_id"] = $in["member_id"]; + $inx["uid"] = $in["uid"]; + $inx["sessionid"] = $in["sessionid"]; + $raw_contacts = $in["raw_contacts"]; + + foreach ( $raw_contacts["contacts"] as $rows){ + $firstname = $rows["name"]["given"]; + $lastname = $rows["name"]["family"]; + $contactid = $rows["contactId"]; + log_message('critical', "************************ $firstname $lastname $contactid"); + } + } private function prepareEndPointData($endpoint, $in, &$call_backend=true,&$local_out=[]){ switch ($endpoint) { case 'cachecontacts': log_message('critical', "************************ cachecontacts 0001 ".serialize($in)); + $this->processContacts( $in ); break; case 'myfiles':