This commit is contained in:
2022-04-24 10:53:27 -04:00
parent a1eac4a91f
commit 886379b0f7
2 changed files with 120 additions and 76 deletions
+9 -8
View File
@@ -642,22 +642,23 @@ class Jobs extends Users_Controller {
$data = $this->getSessionArray();
// echo 'Ameye';
$data['offer_code'] = $this->input->get('offer_code');
$data['yourmessage'] = $this->input->get('yourmessage');
$data['interest_id'] = $this->input->get('interest_id');
$data['member_id'] = $_SESSION['member_id']; // just maing sure
$data['msg_type'] = 'MRKTINT'; // MARKET INTEREST
$in =[];
$in['offer_code'] = $this->input->get('offer_code');
$in['yourmessage'] = $this->input->get('yourmessage');
$in['interest_id'] = $this->input->get('interest_id');
$in['member_id'] = $_SESSION['member_id']; // just maing sure
$in['msg_type'] = 'MRKTINT'; // MARKET INTEREST
$data['action'] = WRENCHBOARD_JOB_MRKTINT_QUEST;
$in['action'] = WRENCHBOARD_JOB_MRKTINT_QUEST;
// $this->load->model('backend_model');
$out = array();
$out['status'] = '';
$res = $this->wrenchboard_api($data, $out);
$res = $this->wrenchboard_api($in, $out);
// print_r($out);
if ($res == PHP_CREATED_OK) {
//echo rand(100,999)." " .$out['client_id'];
echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] ); //'Success - Message sent' . $out['status'];
echo $this->getMarketInterestMessage( $in['offer_code'], $out['client_id'] ); //'Success - Message sent' . $out['status'];
} else {
echo 'Error - ' . $out['status'];
}
@@ -27,78 +27,121 @@
// -->
</script>
<!-- Main content -->
<?php include('common/jobstrip.php'); ?>
<!--begin::Row-->
<div class="row g-5 g-xl-8">
<?php include('common/jobside.php'); ?>
<!--begin::Col-->
<div class="col-xl-9">
<!--begin::Tables Widget 5-->
<div class="card card-xl-stretch mb-5 mb-xl-8">
<!--begin::Header-->
<div class="card-header border-0 pt-5">
<h3 class="card-title align-items-start flex-column">
<a href="#" onclick="showOfferModal('<?= $offer_code; ?>');" >Interest in <?php echo $offer_code; ?></a>
</h3>
<div class="card-toolbar">
</div>
</div>
<!--end::Header-->
<!--begin::Body-->
<div class="card-body py-3">
<div class="tab-content">
<!--begin::Tap pane-->
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
<!-- /main charts -->
<div class="row">
<div class="col-md-8">
<div class="panel panel-flat" >
<div class="panel-heading">
<h6 class="panel-title"><b><?php echo $dash_title; ?> [<a href="#" onclick="showOfferModal('<?= $offer_code; ?>');" ><?php echo $offer_code; ?></a>]</b>-<?php echo $title; ?></h6>
</div>
<table class='table table-striped table-hover table-bordered'>
<tbody>
<tr style="background-color: #CEECF5;">
<td>
<b>Job Added : </b><?php echo $added; ?><br>
<a href='#' onclick="showModal(<?php echo $interest_id; ?>);"><?php echo $client; ?><br>
<b>Member Since : </b><?php echo $client_added; ?></a><br>
</td>
<td style="width:190px;">
<b>Jobs Completed : </b><?php echo $total_jobs_completed; ?><br>
<b>Jobs Active : </b><?php echo $total_jobs_active; ?><br>
<b>Jobs Uncompleted : </b><?php echo $total_jobs_uncompleted; ?><br>
<b>Pending Offers : </b><?php echo $total_pending_offers; ?><br>
% Completion
</td>
<td style="width:90px;">
<table class='table table-condensed'>
<tbody>
<tr><td style='width: 33%;'><div id="cancdiv"><input type=submit id="submit_canc" name="rmview" onclick="return cancelInterest(<?php echo $interest_id; ?>);" class="btn btn-danger btn-xs btn-block" value="Cancel Job"></div></td> </tr>
<tr><td><div id="rejtdiv"><input type=submit id="submit_rejt" name="rmview" onclick="return rejectInterest(<?php echo $interest_id; ?>);" class="btn btn-warning btn-xs btn-block" value="Reject"></div></td> </tr>
<tr><td style='width: 33%;'><div id="accdiv"><input type=submit id="submit_acc" name="mview" onclick="return acceptInterest(<?php echo $interest_id; ?>);" class="btn btn-info btn-xs btn-block" value="Accept"></div></td> </tr>
</tbody>
</table>
</td> </tr>
</tbody>
</table>
</div>
<div class="panel panel-flat" >
<div class="panel-heading">
<h6 class="panel-title"><b>Others Interested in this Task</b></h6>
</div>
<?php echo $job_others_interest_table; ?>
</div>
</div>
<div class="col-md-4">
<div class="thumbnail" style="background-color: #CEECF5;">
Message to <b><?php echo $client; ?></b><hr size='1'>
<form name='offer_message' >
<div class="thumb">
<textarea rows="3" name='offermessage' class="textarea form-control" placeholder="Enter message..."></textarea>
</div>
<div class="text-right">
<button type="submit" id="submit_yourmessage_<?= $offer_code; ?>" onclick="return OMessage('<?= $offer_code; ?>',<?= $interest_id; ?>);" name='btn_submit' class="btn btn-primary btn-xs btn-block" onclick="SendMessage();return false;">Send</button>
</div>
</form>
<div class="caption">
<div id='msg_result_<?= $offer_code; ?>'>
<? echo $message_list; ?>
</div>
</div>
</div>
</div>
</div>
</div>
<!--end::Tap pane-->
</div>
</div>
<!--end::Body-->
</div>
<!--end::Tables Widget 5-->
</div>
<!--end::Col-->
</div>
<!--end::Row-->
<div class="content-wrapper">
<?php include('common/jobstrip.php'); ?>
<!-- Main charts -->
<div class="row">
<div class="col-lg-12">
</div>
</div>
<!-- /main charts -->
<div class="row">
<div class="col-md-9">
<div class="panel panel-flat" >
<div class="panel-heading">
<h6 class="panel-title"><b><?php echo $dash_title; ?> [<a href="#" onclick="showOfferModal('<?= $offer_code; ?>');" ><?php echo $offer_code; ?></a>]</b>-<?php echo $title; ?></h6>
</div>
<table class='table table-striped table-hover table-bordered'>
<tbody>
<tr style="background-color: #CEECF5;">
<td>
<b>Job Added : </b><?php echo $added; ?><br>
<a href='#' onclick="showModal(<?php echo $interest_id; ?>);"><?php echo $client; ?><br>
<b>Member Since : </b><?php echo $client_added; ?></a><br>
</td>
<td style="width:190px;">
<b>Jobs Completed : </b><?php echo $total_jobs_completed; ?><br>
<b>Jobs Active : </b><?php echo $total_jobs_active; ?><br>
<b>Jobs Uncompleted : </b><?php echo $total_jobs_uncompleted; ?><br>
<b>Pending Offers : </b><?php echo $total_pending_offers; ?><br>
% Completion
</td>
<td style="width:90px;">
<table class='table table-condensed'>
<tbody>
<tr><td style='width: 33%;'><div id="cancdiv"><input type=submit id="submit_canc" name="rmview" onclick="return cancelInterest(<?php echo $interest_id; ?>);" class="btn btn-danger btn-xs btn-block" value="Cancel Job"></div></td> </tr>
<tr><td><div id="rejtdiv"><input type=submit id="submit_rejt" name="rmview" onclick="return rejectInterest(<?php echo $interest_id; ?>);" class="btn btn-warning btn-xs btn-block" value="Reject"></div></td> </tr>
<tr><td style='width: 33%;'><div id="accdiv"><input type=submit id="submit_acc" name="mview" onclick="return acceptInterest(<?php echo $interest_id; ?>);" class="btn btn-info btn-xs btn-block" value="Accept"></div></td> </tr>
</tbody>
</table>
</td> </tr>
</tbody>
</table>
</div>
<div class="panel panel-flat" >
<div class="panel-heading">
<h6 class="panel-title"><b>Others Interested in this Task</b></h6>
</div>
<?php echo $job_others_interest_table; ?>
</div>
</div>
<div class="col-md-3">
<div class="thumbnail" style="background-color: #CEECF5;">
Message to <b><?php echo $client; ?></b><hr size='1'>
<form name='offer_message' >
<div class="thumb">
<textarea rows="3" name='offermessage' class="textarea form-control" placeholder="Enter message..."></textarea>
</div>
<div class="text-right">
<button type="submit" id="submit_yourmessage_<?= $offer_code; ?>" onclick="return OMessage('<?= $offer_code; ?>',<?= $interest_id; ?>);" name='btn_submit' class="btn btn-primary btn-xs" onclick="SendMessage();return false;">Send</button>
</div>
</form>
<div class="caption">
<div id='msg_result_<?= $offer_code; ?>'>
<? echo $message_list; ?>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
<!--