fix
This commit is contained in:
@@ -405,7 +405,7 @@ class Proj extends Users_Controller {
|
||||
}
|
||||
|
||||
$data = $this->load_files($data, $jobID);
|
||||
$this->load_files($data, $jobID);
|
||||
//$this->load_files($data, $jobID);
|
||||
|
||||
$this->load->model('dash_model');
|
||||
$out = $this->dash_model->getDashData($data);
|
||||
@@ -681,22 +681,22 @@ $data = $this->getSessionArray();
|
||||
$data['this_job'] = $jbD->this_job;
|
||||
$data['contract_id'] = $jbD->contract_id;
|
||||
$data['job_detail'] = $jbD->job_detail;
|
||||
/*
|
||||
$sqlMsg = "SELECT (CASE WHEN jc.msg_type='FILE' THEN '<a target=\"_blank\" href=\"/smedia/" . ($is_live ? "LIVE" : "TEST") . "/contract/" . $data['contract_id'] . "/'||jc.message||'\">'||jc.message||'</a>' ELSE '<b>['||m.firstname||']->'||jc.created||'</b><br>'||jc.message END) AS msg "
|
||||
. "FROM jobs_contract_message jc "
|
||||
. "LEFT JOIN members m ON m.id=jc.member_id "
|
||||
. "WHERE jc.contract='" . $data['contract_id'] . "' ORDER by jcESC";
|
||||
|
||||
$sqlMsg = "SELECT (CASE WHEN jc.msg_type='FILE' THEN '<a target=\"_blank\" href=\"/smedia/" . ($is_live ? "LIVE" : "TEST") . "/contract/" . $data['contract_id'] . "/'||jc.message||'\">'||jc.message||'</a>' ELSE '<b>['||m.firstname||']->'||jc.created||'</b><br>'||jc.message END) AS msg "
|
||||
. "FROM jobs_contract_message jc "
|
||||
. "LEFT JOIN members m ON m.id=jc.member_id "
|
||||
. "WHERE jc.contract='" . $data['contract_id'] . "' ORDER by jc.id DESC";
|
||||
|
||||
|
||||
|
||||
$file_icon = "<img style=\"width:25px; height:25px;\" alt=\"Icon\" src=\"/site3/assets/media/svg/files/pdf.svg\">";
|
||||
|
||||
$sqlMsg = "SELECT to_char(jc.created, 'YYYY-MM-DD HH24:MI') AS date1, '<b>'||(CASE WHEN jc.msg_type='FILE' THEN 'FILE-' ELSE '' END) ||'</b>'||m.firstname AS title,jc.id as msg_id,"
|
||||
. "(CASE WHEN jc.msg_type='FILE' THEN '<a target=\"_blank\" href=\"/smedia/" . ($is_live ? "LIVE" : "TEST") . "/contract/" . $data['contract_id'] . "/'||jc.message||'\">'||jc.message||'</a>' ELSE jc.message END) AS msg "
|
||||
. "FROM jobs_contract_message jc "
|
||||
. "LEFT JOIN members m ON m.id=jc.member_id "
|
||||
. "WHERE jc.contract='" . $data['contract_id'] . "' ORDER by jc.id DESC";
|
||||
/*
|
||||
$file_icon = "<img style=\"width:25px; height:25px;\" alt=\"Icon\" src=\"/site3/assets/media/svg/files/pdf.svg\">";
|
||||
|
||||
$sqlMsg = "SELECT to_char(jc.created, 'YYYY-MM-DD HH24:MI') AS date1, '<b>'||(CASE WHEN jc.msg_type='FILE' THEN 'FILE-' ELSE '' END) ||'</b>'||m.firstname AS title,jc.id as msg_id,"
|
||||
. "(CASE WHEN jc.msg_type='FILE' THEN '<a target=\"_blank\" href=\"/smedia/" . ($is_live ? "LIVE" : "TEST") . "/contract/" . $data['contract_id'] . "/'||jc.message||'\">'||jc.message||'</a>' ELSE jc.message END) AS msg "
|
||||
. "FROM jobs_contract_message jc "
|
||||
. "LEFT JOIN members m ON m.id=jc.member_id "
|
||||
. "WHERE jc.contract='" . $data['contract_id'] . "' ORDER by jc.id DESC";
|
||||
*/
|
||||
$sqlMsg = "SELECT to_char(jc.created, 'YYYY-MM-DD HH24:MI') AS date1, '<b>'||(CASE WHEN jc.msg_type='FILE' THEN ' - ' ELSE '' END) ||'</b>'||m.firstname AS title,jc.id as msg_id,"
|
||||
. "(CASE WHEN jc.msg_type='FILE' THEN '<a target=\"_blank\" href=\"/smedia/" . ($is_live ? "LIVE" : "TEST") . "/contract/" . $data['contract_id'] . "/'||jc.message||'\">'||jc.message||'</a>' ELSE jc.message END) AS msg, "
|
||||
. " jc.msg_type, jc.message "
|
||||
@@ -713,7 +713,18 @@ $data = $this->getSessionArray();
|
||||
//===================
|
||||
|
||||
$data['message_result'] = $query_message->result();
|
||||
|
||||
|
||||
//----------------------------------------------------------------
|
||||
/* Neeed to get just the files here - part of the display items */
|
||||
$files_only= [];
|
||||
foreach ($data['message_result'] as $frow){
|
||||
if ($frow->msg_type==='FILE'){
|
||||
$files_only[]=$frow;
|
||||
}
|
||||
}
|
||||
$data['files_only'] =$files_only;
|
||||
//----- END OFFILYER FILES ONLY OUT ------------------------------
|
||||
|
||||
// $data['message_result_show'] = $this->messageAccordion($data['message_result']);
|
||||
|
||||
|
||||
@@ -1023,7 +1034,9 @@ $data = $this->getSessionArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* This is the file upload function
|
||||
*/
|
||||
private function process_files($files) {
|
||||
$result = "";
|
||||
$d_txt = "";
|
||||
|
||||
@@ -20,7 +20,7 @@ foreach($message_result as $row){
|
||||
</h2>
|
||||
<div id="kt_accordion_1_<?=$row->msg_id?>" class="accordion-collapse collapse" aria-labelledby="kt_accordion_1_header_1" data-bs-parent="#kt_accordion_1">
|
||||
<div class="accordion-body">
|
||||
<?= $row->msg?>
|
||||
<?=$row->msg?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -66,130 +66,130 @@
|
||||
<div class="table-responsive">
|
||||
|
||||
|
||||
<ul class="nav nav-tabs nav-line-tabs mb-5 fs-6">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-bs-toggle="tab" href="#kt_tab_pane_1">Send Message</a>
|
||||
</li>
|
||||
<!-- li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" href="#kt_tab_pane_2">Add File(s)</a>
|
||||
</li -->
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" href="#kt_tab_pane_3">Actions</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav nav-tabs nav-line-tabs mb-5 fs-6">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" data-bs-toggle="tab" href="#kt_tab_pane_1">Send Message</a>
|
||||
</li>
|
||||
<!-- li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" href="#kt_tab_pane_2">Add File(s)</a>
|
||||
</li -->
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" data-bs-toggle="tab" href="#kt_tab_pane_3">Actions</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="kt_tab_pane_1" role="tabpanel">
|
||||
<div id="sendmessagenote"></div>
|
||||
<div class="tab-content" id="myTabContent">
|
||||
<div class="tab-pane fade show active" id="kt_tab_pane_1" role="tabpanel">
|
||||
<div id="sendmessagenote"></div>
|
||||
|
||||
<form name="message" id="message" action="/proj/thisjob" method='POST'>
|
||||
<input type='hidden' name='ajax' value='1'>
|
||||
<input type='hidden' name='jobID' value='<?php echo $jobID; ?>'>
|
||||
<input type='hidden' name='contractId' value='<?php echo $contract_id; ?>'>
|
||||
<form name="message" id="message" action="/proj/thisjob" method='POST'>
|
||||
<input type='hidden' name='ajax' value='1'>
|
||||
<input type='hidden' name='jobID' value='<?php echo $jobID; ?>'>
|
||||
<input type='hidden' name='contractId' value='<?php echo $contract_id; ?>'>
|
||||
|
||||
<div class="form-group">
|
||||
<textarea cols="18" onkeypress="textContentChanged();" style="height:180px;" rows="3" id='jobmessage' name='jobmessage' class="textarea wysihtml5 wysihtml5-min form-control" placeholder="Enter message here ..."></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<textarea cols="18" onkeypress="textContentChanged();" style="height:180px;" rows="3" id='jobmessage' name='jobmessage' class="textarea wysihtml5 wysihtml5-min form-control" placeholder="Enter message here ..."></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<table class="table table-row-dashed table-row-gray-200 align-middle gs-0 gy-4">
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<div id="remain_text"></div>
|
||||
</td>
|
||||
<td style="width: 30%;"><div id="sendmessagenote"></div></td>
|
||||
<td style="width: 20%; text-align:right;"> <button id='btn_cancel' name='btn_cancel' type="submit" class="btn btn-danger btn-sm" onclick="document.message.jobmessage.value = ''; return false;">Clear</button></td>
|
||||
<td style="width: 20%; text-align:right;"><button id='btn_submit' name='btn_submit' type="submit" class="btn btn-primary btn-sm" onclick="SendMessage();return false;">Send</button> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<table class="table table-row-dashed table-row-gray-200 align-middle gs-0 gy-4">
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="text-align: left;">
|
||||
<div id="remain_text"></div>
|
||||
</td>
|
||||
<td style="width: 30%;"><div id="sendmessagenote"></div></td>
|
||||
<td style="width: 20%; text-align:right;"> <button id='btn_cancel' name='btn_cancel' type="submit" class="btn btn-danger btn-sm" onclick="document.message.jobmessage.value = ''; return false;">Clear</button></td>
|
||||
<td style="width: 20%; text-align:right;"><button id='btn_submit' name='btn_submit' type="submit" class="btn btn-primary btn-sm" onclick="SendMessage();return false;">Send</button> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
include 'uploads/upload_files.php';
|
||||
?>
|
||||
<?php
|
||||
include 'uploads/upload_files.php';
|
||||
?>
|
||||
|
||||
</div>
|
||||
<!-- div class="tab-pane fade" id="kt_tab_pane_2" role="tabpanel">
|
||||
<div class="form-group">
|
||||
<form action="/proj/thisjob" method='POST' enctype="multipart/form-data">
|
||||
<input type='hidden' name='uploadForm' value='1'>
|
||||
<input type='hidden' name='jobID' value='<?php echo $jobID; ?>'>
|
||||
<input type='hidden' name='contractId' value='<?php echo $contract_id; ?>'>
|
||||
<input type="file" class="file-input" multiple="multiple" name="fileToUpload[]" id="fileToUpload[]">
|
||||
<span class="help-block">There is a file size limit [<?php echo UPLOAD_FILE_SIZE; ?> MB]. Split large files into smaller size</span>
|
||||
</form>
|
||||
</div>
|
||||
</div -->
|
||||
<div class="tab-pane fade" id="kt_tab_pane_3" role="tabpanel">
|
||||
|
||||
|
||||
<h3>Use action to manage the status of the project</h3>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
if ($this_is_client == true) {
|
||||
?>
|
||||
<table class='table table-striped table-hover table-bordered table-condensed'>
|
||||
<tr>
|
||||
<td>
|
||||
If you have completed this task and will like the owner to review the work for acceptance, click "Completed" button.
|
||||
</td>
|
||||
<td style="width:140px;">
|
||||
<div id="req_completion"> <button type="submit" id="req_completion_submit" class="btn btn-primary btn-sm" onclick="return requestCompletion('<?php echo $job_contract; ?>');" <?php echo $disabled1; ?> >Completed</button></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
If you are unable to complete and will like this project canceled, click "Cancel task" button.
|
||||
</td>
|
||||
<td style="width:140px;">
|
||||
<div id="req_cancel"> <button type="submit" id="req_cancel_submit" onclick="return requestCancel('<?php echo $job_contract; ?>');" class="btn btn-danger btn-sm" <?php echo $disabled2; ?> >Request Cancel</button> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="font-size: large; font-family: sans-serif">
|
||||
<p style="color: #ff0000; background-color: #ffffff">Note: Buttons may be disabled for some days at the start of the task</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- div class="tab-pane fade" id="kt_tab_pane_2" role="tabpanel">
|
||||
<div class="form-group">
|
||||
<form action="/proj/thisjob" method='POST' enctype="multipart/form-data">
|
||||
<input type='hidden' name='uploadForm' value='1'>
|
||||
<input type='hidden' name='jobID' value='<?php echo $jobID; ?>'>
|
||||
<input type='hidden' name='contractId' value='<?php echo $contract_id; ?>'>
|
||||
<input type="file" class="file-input" multiple="multiple" name="fileToUpload[]" id="fileToUpload[]">
|
||||
<span class="help-block">There is a file size limit [<?php echo UPLOAD_FILE_SIZE; ?> MB]. Split large files into smaller size</span>
|
||||
</form>
|
||||
</div>
|
||||
</div -->
|
||||
<div class="tab-pane fade" id="kt_tab_pane_3" role="tabpanel">
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<h3>Use action to manage the status of the project</h3>
|
||||
<div class="form-group">
|
||||
<?php
|
||||
if ($this_is_client == true) {
|
||||
?>
|
||||
<table class='table table-striped table-hover table-bordered table-condensed'>
|
||||
<tr>
|
||||
<td>
|
||||
If you have completed this task and will like the owner to review the work for acceptance, click "Completed" button.
|
||||
</td>
|
||||
<td style="width:140px;">
|
||||
<div id="req_completion"> <button type="submit" id="req_completion_submit" class="btn btn-primary btn-sm" onclick="return requestCompletion('<?php echo $job_contract; ?>');" <?php echo $disabled1; ?> >Completed</button></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
If you are unable to complete and will like this project canceled, click "Cancel task" button.
|
||||
</td>
|
||||
<td style="width:140px;">
|
||||
<div id="req_cancel"> <button type="submit" id="req_cancel_submit" onclick="return requestCancel('<?php echo $job_contract; ?>');" class="btn btn-danger btn-sm" <?php echo $disabled2; ?> >Request Cancel</button> </div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div style="font-size: large; font-family: sans-serif">
|
||||
<p style="color: #ff0000; background-color: #ffffff">Note: Buttons may be disabled for some days at the start of the task</p>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<?php
|
||||
if ($this_is_project_owner == true) {
|
||||
?>
|
||||
<table class='table table-striped table-hover table-bordered table-condensed'>
|
||||
<tr>
|
||||
<td>
|
||||
Accept or reject the completion of the task below. We will notify the other partner and finalize payment for the task.
|
||||
</td>
|
||||
<td style="width:140px;">
|
||||
<div id="accept_completion"> <button type="submit" id="accept_completion_submit" class="btn btn-primary btn-sm" onclick="return acceptCompletion('<?php echo $job_contract; ?>');" <?php echo $disabled11; ?> >Accept Completion</button></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
If you reject the work done or want more review before accepting, click "Reject Completion."
|
||||
</td>
|
||||
<td style="width:140px;">
|
||||
<div id="reject_completion"> <button type="submit" id="reject_completion_submit" class="btn btn-danger btn-sm" <?php echo $disabled22; ?> onclick="return rejectCompletion('<?php echo $job_contract; ?>');" >Reject Completion</button></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php
|
||||
if ($this_is_project_owner == true) {
|
||||
?>
|
||||
<table class='table table-striped table-hover table-bordered table-condensed'>
|
||||
<tr>
|
||||
<td>
|
||||
Accept or reject the completion of the task below. We will notify the other partner and finalize payment for the task.
|
||||
</td>
|
||||
<td style="width:140px;">
|
||||
<div id="accept_completion"> <button type="submit" id="accept_completion_submit" class="btn btn-primary btn-sm" onclick="return acceptCompletion('<?php echo $job_contract; ?>');" <?php echo $disabled11; ?> >Accept Completion</button></div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
If you reject the work done or want more review before accepting, click "Reject Completion."
|
||||
</td>
|
||||
<td style="width:140px;">
|
||||
<div id="reject_completion"> <button type="submit" id="reject_completion_submit" class="btn btn-danger btn-sm" <?php echo $disabled22; ?> onclick="return rejectCompletion('<?php echo $job_contract; ?>');" >Reject Completion</button></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@@ -197,6 +197,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card-body py-3">
|
||||
|
||||
<?php
|
||||
include 'uploads/file_table.php';
|
||||
?>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xl-4">
|
||||
|
||||
Reference in New Issue
Block a user