Files
WrenchBoradWeb/www/application/views/jobs/view_market.php
T
2022-09-16 22:38:31 -04:00

212 lines
7.9 KiB
PHP

<form method="post" name="post_nav_find" action="">
<input type="hidden" name="jobOfferID" value="">
</form>
<script type="text/javascript">
<!--
function post_nav_find_action(what, value) {
// alert(what);
document.post_nav_find.action = what + '';
document.post_nav_find.jobOfferID.value = value;
document.post_nav_find.submit();
return false;
}
// -->
</script>
<div class="d-flex flex-wrap flex-stack my-5">
<!--begin::Heading-->
<h2 class="fs-2 fw-bold my-2">Available Jobs
<!--end::Heading-->
<!--begin::Controls-->
<div class="d-flex flex-wrap my-1">
<!--begin::Select wrapper-->
<!-- div class="m-0">
<select name="status" data-control="select2" data-hide-search="true" class="form-select form-select-sm bg-body border-body fw-bolder w-125px">
<option value="Active" selected="selected">Active</option>
<option value="Approved">In Progress</option>
<option value="Declined">To Do</option>
<option value="In Progress">Completed</option>
</select>
</div -->
<!--end::Select wrapper-->
</div>
</div>
<div class="row g-6 g-xl-9">
<?php
// $market_table_result
//onclick="showJobModal('2R05W439BR');"
//onclick="return EDetail('$row->offer_code')
foreach ($market_table_result as $row)
{
?>
<!--begin::Col-->
<div class="col-md-6 col-xl-4" >
<!--begin::Card-->
<a href="#" onclick="return showMarketJobModal('<?=$row->offer_code?>');" class="card border-hover-primary">
<!--begin:: Card body-->
<div class="card-body p-9" style="height: 300px">
<!--begin::Name-->
<div class="fs-3 fw-bolder text-dark" style="height: 50px;"><?=strlen($row->title)> 65? substr($row->title,0,65)."..." : $row->title ?></div>
<!--end::Name-->
<!--begin::Description-->
<p class="text-gray-400 fw-bold fs-5 mt-1 mb-7" style="height: 65px;"><?=strlen($row->description)> 100 ? substr($row->description,0,100)."..." : $row->description ?></p>
<!--end::Description-->
<!--begin::Info-->
<div class="d-flex flex-wrap mb-5">
<!--begin::Due-->
<div class="border border-gray-300 border-dashed rounded min-w-125px py-3 px-4 me-7 mb-3">
<div class="fs-6 text-gray-800 fw-bolder"><?=$row->timeline_days?> day(s)</div>
<div class="fw-bold text-gray-400">Timeline</div>
</div>
<!--end::Due-->
<!--begin::Budget-->
<div class="border border-gray-300 border-dashed rounded min-w-125px py-3 px-4 mb-3">
<div class="fs-6 text-gray-800 fw-bolder">N <? echo money_format('%.2n', $row->price * 0.01); ?></div>
<div class="fw-bold text-gray-400">Budget</div>
</div>
<!--end::Budget-->
</div>
<!--end::Info-->
<!--begin::Users-->
<div class="symbol-group symbol-hover">
<!--begin::User-->
<?=$row->offer_code?>
<!--begin::User-->
</div>
<!--end::Users-->
</div>
<!--end:: Card body-->
</a>
<!--end::Card-->
</div>
<!--end::Col-->
<?php
}
?>
</div>
<div class="modal-body scroll-y px-10 px-lg-15 pt-0 pb-15">
<div id="modal_theme_primary" class="modal fade">
<div class="modal-dialog modal-dialog-centered mw-650px">
<div class="modal-content rounded">
<!--begin::Modal header-->
<div class="modal-header pb-0 border-0 justify-content-end">
<!--begin::Close-->
<div class="btn btn-sm btn-icon btn-active-color-primary" data-bs-dismiss="modal">
<!--begin::Svg Icon | path: icons/duotune/arrows/arr061.svg-->
<span class="svg-icon svg-icon-1">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
<rect opacity="0.5" x="6" y="17.3137" width="16" height="2" rx="1" transform="rotate(-45 6 17.3137)" fill="currentColor" />
<rect x="7.41422" y="6" width="16" height="2" rx="1" transform="rotate(45 7.41422 6)" fill="currentColor" />
</svg>
</span>
<!--end::Svg Icon-->
</div>
<!--end::Close-->
</div>
<!--begin::Modal header-->
<div id="modal-content">
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
<!--
var current_job_contract = null;
function showMarketJobModal(job_contract) {
//alert(job_contract);
if (typeof event !== 'undefined') {
event.preventDefault();
}
// load the modal content with a loader gif and message
$('#modal-content').html('Loading...');
// show modal window
$('#modal_theme_primary').modal('show');
//alert("/jobs/marketdetail?proc=NCOMPLETE&job_contract=" + job_contract);
$.ajax({
url: "/jobs/marketdetail?proc=NCOMPLETE&job_contract=" + job_contract
}).done(function (data) {
//alert(data);
$('#modal-content').html(data);
});
}
function EDetail(job_contract) {
if (current_job_contract!=null) {
$('#'+current_job_contract).html('');
current_job_contract = null;
}
current_job_contract = job_contract;
//$('#req_completion').html('Processing...');
//$('#req_completion_submit').prop('disabled', true);
$('#submit_'+job_contract).prop('disabled', true);
$.ajax({
url: "/jobs/marketdetail?proc=NCOMPLETE&job_contract=" + job_contract
}).done(function( data ) {
$('#'+job_contract).html(data);
$('#submit_'+job_contract).prop('disabled', false);
});
return false;
}
function SInterest(job_contract) {
//$('#req_completion').html('Processing...');
//$('#req_completion_submit').prop('disabled', true);
$('#submit_interest_'+job_contract).prop('disabled', true);
$.ajax({
url: "/jobs/showinterest?proc=NCOMPLETE&job_contract=" + job_contract
}).done(function( data ) {
$('#'+job_contract).html(data);
$('#submit_interest_'+job_contract).prop('disabled', false);
});
return false;
}
function OMessage(offer_code) {
if (document.job_message.yourmessage.value=='') {
alert('Missing message!');
return false;
}
//$('#msg_result_'+offer_code).html('Processing...');
$('#submit_yourmessage_'+offer_code).prop('disabled', true);
$.ajax({
url: "/jobs/marketrmessage?proc=NCOMPLETE&offer_code=" + offer_code + "&yourmessage=" + document.job_message.yourmessage.value
}).done(function( data ) {
$('#msg_result_'+offer_code).html(data);
// document.offer_individual.rec_email.value = '';
$('#submit_yourmessage_'+offer_code).prop('disabled', false);
});
return false;
}
// -->
</script>