Fixed Enquiry register status not updating closes #26
This commit is contained in:
parent
05cadcf644
commit
5c8921c818
|
|
@ -22,13 +22,11 @@ class EnquiriesController extends AppController {
|
|||
function index() {
|
||||
$this->Enquiry->recursive = 0;
|
||||
$this->set('enquiries', $this->paginate());
|
||||
$statuses = $this->Enquiry->Status->find('all', array('recursive'=>0));
|
||||
$status_list = array();
|
||||
foreach ($statuses as $status) {
|
||||
$statusid = $status['Status']['id'];
|
||||
$status_list[$statusid] = $status['Status']['name'];
|
||||
}
|
||||
$status_list = $this->Enquiry->Status->getJSON();
|
||||
|
||||
$this->set('status_list', $status_list);
|
||||
$classNames = $this->Enquiry->Status->getClassNamesJSON();
|
||||
$this->set('class_names', $classNames);
|
||||
|
||||
//debug($this->paginate());
|
||||
// $this->set('status_list', $this->Enquiry->Status->find('list'));
|
||||
|
|
@ -444,12 +442,13 @@ class EnquiriesController extends AppController {
|
|||
|
||||
function update_status() {
|
||||
if($this->data) {
|
||||
App::import('Core', 'Sanitize');
|
||||
$new_status = Sanitize::clean($this->data['Enquiry']['status_id']);
|
||||
$this->Enquiry->id = $this->data['Enquiry']['id'];
|
||||
$this->Enquiry->saveField('status_id', $new_status);
|
||||
$this->set('enquiry', $this->Enquiry->findById($this->data['Enquiry']['id']));
|
||||
|
||||
|
||||
$enquiry = $this->Enquiry->read(null, $this->data['Enquiry']['id']);
|
||||
$enquiry['Enquiry']['status_id'] = $this->data['Enquiry']['status_id'];
|
||||
|
||||
$this->Enquiry->save($enquiry);
|
||||
|
||||
$this->set('enquiry', $this->Enquiry->read(null,$enquiry['Enquiry']['id']));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,23 +1,36 @@
|
|||
<?php
|
||||
|
||||
class Status extends AppModel {
|
||||
|
||||
var $name = 'Status';
|
||||
var $name = 'Status';
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
var $hasMany = array(
|
||||
'Enquiry' => array('className' => 'Enquiry',
|
||||
'foreignKey' => 'status_id',
|
||||
'dependent' => false,
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => '',
|
||||
'limit' => '',
|
||||
'offset' => '',
|
||||
'exclusive' => '',
|
||||
'finderQuery' => '',
|
||||
'counterQuery' => ''
|
||||
)
|
||||
);
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
var $hasMany = array(
|
||||
'Enquiry' => array('className' => 'Enquiry',
|
||||
'foreignKey' => 'status_id',
|
||||
'dependent' => false,
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => '',
|
||||
'limit' => '',
|
||||
'offset' => '',
|
||||
'exclusive' => '',
|
||||
'finderQuery' => '',
|
||||
'counterQuery' => ''
|
||||
)
|
||||
);
|
||||
|
||||
function getJSON() {
|
||||
$statuses = $this->find('list', array('fields'=>array('Status.name')));
|
||||
return json_encode($statuses);
|
||||
}
|
||||
|
||||
function getClassNamesJSON() {
|
||||
$statuses = $this->find('list', array('fields'=>array('Status.class')));
|
||||
return json_encode($statuses);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
|
@ -1,39 +1,38 @@
|
|||
<?php echo $javascript->link('jquery.jeditable.mini'); ?>
|
||||
|
||||
<? //$javascript->link('ajax_pagination_enquiry'); ?>
|
||||
<?php echo $javascript->link('jquery.jeditable.mini');
|
||||
echo $javascript->link('enquiry_table'); ?>
|
||||
|
||||
|
||||
<?php echo $paginator->options(array('url'=>$this->passedArgs)); ?>
|
||||
<?php echo $paginator->options(array('url' => $this->passedArgs)); ?>
|
||||
|
||||
<?php
|
||||
<?php
|
||||
echo $paginator->counter(array(
|
||||
'format' => __('Page %page% of %pages%, showing %current% Enquiries out of %count% total, starting on record %start%, ending on %end%', true)
|
||||
'format' => __('Page %page% of %pages%, showing %current% Enquiries out of %count% total, starting on record %start%, ending on %end%', true)
|
||||
));
|
||||
?>
|
||||
|
||||
<div class="paging">
|
||||
|
||||
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||
| <?php echo $paginator->numbers();?>
|
||||
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));?>
|
||||
<?php echo $paginator->prev('<< ' . __('previous', true), array(), null, array('class' => 'disabled')); ?>
|
||||
| <?php echo $paginator->numbers(); ?>
|
||||
<?php echo $paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled')); ?>
|
||||
</div>
|
||||
|
||||
<table cellpadding="0" cellspacing="0" class="mer">
|
||||
<tr>
|
||||
<th><?php echo $paginator->sort('user_id');?></th>
|
||||
<th><?php echo $paginator->sort('Date', 'created');?></th>
|
||||
<th><?php echo $paginator->sort('user_id'); ?></th>
|
||||
<th><?php echo $paginator->sort('Date', 'created'); ?></th>
|
||||
<?php /* <th> echo $paginator->sort('Date Submitted', 'submitted'); </th> */ ?>
|
||||
<th><?php echo $paginator->sort('principle_id');?></th>
|
||||
<th><?php echo $paginator->sort('Enquiry Number', 'title');?></th>
|
||||
<th><?php echo $paginator->sort('customer_id');?></th>
|
||||
<th><?php echo $paginator->sort('contact_id');?></th>
|
||||
<th><?php echo $paginator->sort('principle_id'); ?></th>
|
||||
<th><?php echo $paginator->sort('Enquiry Number', 'title'); ?></th>
|
||||
<th><?php echo $paginator->sort('customer_id'); ?></th>
|
||||
<th><?php echo $paginator->sort('contact_id'); ?></th>
|
||||
<th><?php __('Email'); ?></th>
|
||||
<th><?php __('Phone No'); ?></th>
|
||||
|
||||
|
||||
<th><?php echo $paginator->sort('status_id');?></th>
|
||||
<th>Comments</th>
|
||||
<th class="actions"><?php __('Actions');?></th>
|
||||
<th><?php echo $paginator->sort('status_id'); ?></th>
|
||||
<th>Comments</th>
|
||||
<th class="actions"><?php __('Actions'); ?></th>
|
||||
</tr>
|
||||
<?php
|
||||
$i = 0;
|
||||
|
|
@ -43,228 +42,145 @@ echo $paginator->counter(array(
|
|||
// $class = ' class="altrow"';
|
||||
//}
|
||||
/* Set Row colour to Yellow if the Job has been won and turned into an order.
|
||||
*
|
||||
* re-do this as a switch statement. -Feb 2011.
|
||||
*
|
||||
* */
|
||||
if($enquiry['Status']['id'] == 3) {
|
||||
*
|
||||
* re-do this as a switch statement. -Feb 2011.
|
||||
*
|
||||
* */
|
||||
if ($enquiry['Status']['id'] == 3) {
|
||||
$class = ' class="jobwon"';
|
||||
}
|
||||
else if($enquiry['Status']['id'] == 4) {
|
||||
} else if ($enquiry['Status']['id'] == 4) {
|
||||
$class = ' class="joblost"';
|
||||
}
|
||||
else if($enquiry['Status']['id'] == 8) {
|
||||
} else if ($enquiry['Status']['id'] == 8) {
|
||||
$class = ' class="joblost"';
|
||||
}
|
||||
else if($enquiry['Status']['id'] == 9) {
|
||||
} else if ($enquiry['Status']['id'] == 9) {
|
||||
$class = ' class="joblost"';
|
||||
}
|
||||
else if($enquiry['Status']['id'] == 10) {
|
||||
} else if ($enquiry['Status']['id'] == 10) {
|
||||
$class = ' class="joblost"';
|
||||
}
|
||||
else if($enquiry['Status']['id'] == 6) {
|
||||
} else if ($enquiry['Status']['id'] == 6) {
|
||||
$class = ' class="information"';
|
||||
}
|
||||
else if($enquiry['Status']['id'] == 11) {
|
||||
} else if ($enquiry['Status']['id'] == 11) {
|
||||
$class = ' class="informationsent"';
|
||||
}
|
||||
else if($enquiry['Status']['id'] == 5) {
|
||||
} else if ($enquiry['Status']['id'] == 5) {
|
||||
$class = ' class="quoted"';
|
||||
}
|
||||
else if($enquiry['Status']['id'] == 1) {
|
||||
} else if ($enquiry['Status']['id'] == 1) {
|
||||
$class = ' class="requestforquote"';
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<tr<?php echo $class;?> id="row<?php echo $enquiry['Enquiry']['id']; ?>">
|
||||
<?php $nameclass = null;
|
||||
if($enquiry['Enquiry']['posted'] == 1) {
|
||||
<tr<?php echo $class; ?> id="row<?php echo $enquiry['Enquiry']['id']; ?>">
|
||||
<?php
|
||||
$nameclass = null;
|
||||
if ($enquiry['Enquiry']['posted'] == 1) {
|
||||
$nameclass = ' class="posted"';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
$nameclass = 'class="notposted"';
|
||||
}
|
||||
?>
|
||||
<td <?=$nameclass?>>
|
||||
<?php
|
||||
/* Take the First Letter from First/Last Names to make the initials. Could be a problem if Users have the Same Initials */
|
||||
$firstname = $enquiry['User']['first_name'];
|
||||
$lastname = $enquiry['User']['last_name']; ?>
|
||||
<?php echo $html->link($firstname[0].$lastname[0], array('controller'=> 'users', 'action'=>'view', $enquiry['User']['id'])); ?>
|
||||
</td>
|
||||
<td <?= $nameclass ?>>
|
||||
<?php
|
||||
/* Take the First Letter from First/Last Names to make the initials. Could be a problem if Users have the Same Initials */
|
||||
$firstname = $enquiry['User']['first_name'];
|
||||
$lastname = $enquiry['User']['last_name'];
|
||||
?>
|
||||
<?php echo $html->link($firstname[0] . $lastname[0], array('controller' => 'users', 'action' => 'view', $enquiry['User']['id'])); ?>
|
||||
</td>
|
||||
|
||||
<td class="enqdate">
|
||||
<td class="enqdate">
|
||||
<?php
|
||||
/* Change the date from MySQL DATETIME to a D M Y format */
|
||||
echo date('j M Y',$time->toUnix($enquiry['Enquiry']['created'])); ?>
|
||||
</td>
|
||||
echo date('j M Y', $time->toUnix($enquiry['Enquiry']['created']));
|
||||
?>
|
||||
</td>
|
||||
|
||||
|
||||
<?php
|
||||
/* <td class="enqdate">
|
||||
|
||||
Change the date from MySQL DATETIME to a D M Y format
|
||||
if($enquiry['Enquiry']['submitted']) {
|
||||
echo date('j M Y',$time->toUnix($enquiry['Enquiry']['submitted']));
|
||||
}
|
||||
else {
|
||||
/* Maybe should make this so only the assigned user can mark it as submitted.
|
||||
|
||||
echo $html->link('Not Submitted', array('controller'=>'enquiries', 'action'=>'mark_submitted', $enquiry['Enquiry']['id']));
|
||||
}
|
||||
|
||||
</td>
|
||||
*/
|
||||
|
||||
Change the date from MySQL DATETIME to a D M Y format
|
||||
if($enquiry['Enquiry']['submitted']) {
|
||||
echo date('j M Y',$time->toUnix($enquiry['Enquiry']['submitted']));
|
||||
}
|
||||
else {
|
||||
/* Maybe should make this so only the assigned user can mark it as submitted.
|
||||
|
||||
echo $html->link('Not Submitted', array('controller'=>'enquiries', 'action'=>'mark_submitted', $enquiry['Enquiry']['id']));
|
||||
}
|
||||
|
||||
</td>
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<td class="principlename">
|
||||
<td class="principlename">
|
||||
<?php
|
||||
if($enquiry['Principle']['short_name']) {
|
||||
echo $html->link($enquiry['Principle']['short_name'], array('controller'=> 'principles', 'action'=>'view', $enquiry['Principle']['id']));
|
||||
}
|
||||
else {
|
||||
echo $html->link($enquiry['Principle']['name'], array('controller'=> 'principles', 'action'=>'view', $enquiry['Principle']['id']));
|
||||
if ($enquiry['Principle']['short_name']) {
|
||||
echo $html->link($enquiry['Principle']['short_name'], array('controller' => 'principles', 'action' => 'view', $enquiry['Principle']['id']));
|
||||
} else {
|
||||
echo $html->link($enquiry['Principle']['name'], array('controller' => 'principles', 'action' => 'view', $enquiry['Principle']['id']));
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $html->link($enquiry['Enquiry']['title'], array('controller'=>'enquiries', 'action'=>'view', $enquiry['Enquiry']['id'])); ?>
|
||||
</td>
|
||||
</td>
|
||||
<td>
|
||||
<?php echo $html->link($enquiry['Enquiry']['title'], array('controller' => 'enquiries', 'action' => 'view', $enquiry['Enquiry']['id'])); ?>
|
||||
</td>
|
||||
|
||||
<td class="customername">
|
||||
<?php echo $html->link($enquiry['Customer']['name'], array('controller'=> 'customers', 'action'=>'view', $enquiry['Customer']['id'])); ?>
|
||||
</td>
|
||||
<td class="contactname">
|
||||
<?php echo $html->link($enquiry['Contact']['first_name'].' '.$enquiry['Contact']['last_name'], array('controller'=> 'users', 'action'=>'view', $enquiry['Contact']['id'])); ?>
|
||||
</td>
|
||||
<td class="contactemail">
|
||||
<? //BCC address to Con is hardcoded in here. ?>
|
||||
<?php echo $html->link($enquiry['Contact']['email'], 'mailto:'.$enquiry['Contact']['email'].'?subject='.$enquiry['Enquiry']['title'].'&bcc=carpis@cmctechnologies.com.au'); ?>
|
||||
</td>
|
||||
<td class="contactemail">
|
||||
<td class="customername">
|
||||
<?php echo $html->link($enquiry['Customer']['name'], array('controller' => 'customers', 'action' => 'view', $enquiry['Customer']['id'])); ?>
|
||||
</td>
|
||||
<td class="contactname">
|
||||
<?php echo $html->link($enquiry['Contact']['first_name'] . ' ' . $enquiry['Contact']['last_name'], array('controller' => 'users', 'action' => 'view', $enquiry['Contact']['id'])); ?>
|
||||
</td>
|
||||
<td class="contactemail">
|
||||
<? //BCC address to Con is hardcoded in here. ?>
|
||||
<?php echo $html->link($enquiry['Contact']['email'], 'mailto:' . $enquiry['Contact']['email'] . '?subject=' . $enquiry['Enquiry']['title'] . '&bcc=carpis@cmctechnologies.com.au'); ?>
|
||||
</td>
|
||||
<td class="contactemail">
|
||||
<?php
|
||||
if($enquiry['Contact']['mobile']) {
|
||||
if ($enquiry['Contact']['mobile']) {
|
||||
echo $enquiry['Contact']['mobile'];
|
||||
}
|
||||
else if($enquiry['Contact']['direct_phone']) {
|
||||
} else if ($enquiry['Contact']['direct_phone']) {
|
||||
echo $enquiry['Contact']['direct_phone'];
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
echo $enquiry['Contact']['phone'];
|
||||
if($enquiry['Contact']['phone_extension']) {
|
||||
echo ' ext:'.$enquiry['Contact']['phone_extension'];
|
||||
}
|
||||
}
|
||||
if ($enquiry['Contact']['phone_extension']) {
|
||||
echo ' ext:' . $enquiry['Contact']['phone_extension'];
|
||||
}
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</td>
|
||||
|
||||
<td class="status"><div id="<? echo $enquiry['Enquiry']['id']; ?>"><?php echo $enquiry['Status']['name']; ?></div>
|
||||
<?php
|
||||
$enqid = $enquiry['Enquiry']['id'];
|
||||
<td class="statusTD">
|
||||
<div class="status" id="<?php echo $enquiry['Enquiry']['id']; ?>">
|
||||
<?php echo $enquiry['Status']['name']; ?>
|
||||
</div>
|
||||
</td>
|
||||
<td class="comments"><?
|
||||
if (strlen($enquiry['Enquiry']['comments']) > 150) {
|
||||
echo substr($enquiry['Enquiry']['comments'], 0, 150);
|
||||
echo $html->link('.....', array('controller' => 'enquiries', 'action' => 'view', $enquiry['Enquiry']['id']));
|
||||
} else {
|
||||
echo $enquiry['Enquiry']['comments'];
|
||||
}
|
||||
;
|
||||
?></td>
|
||||
<td class="viewedit">
|
||||
<?php echo $html->link(__('View', true), array('controller' => 'enquiries', 'action' => 'view', $enquiry['Enquiry']['id'])); ?>
|
||||
<?php echo $html->link(__('Edit', true), array('controller' => 'enquiries', 'action' => 'edit', $enquiry['Enquiry']['id'])); ?>
|
||||
|
||||
$statusList = $status_list;
|
||||
|
||||
$statusList['selected'] = $enquiry['Enquiry']['status_id'];
|
||||
|
||||
$jsonList = json_encode($statusList);
|
||||
|
||||
$jsblock = <<<ENDJS
|
||||
|
||||
|
||||
\$('#$enqid').editable('/enquiries/update_status', {
|
||||
id : 'data[Enquiry][id]',
|
||||
name: 'data[Enquiry][status_id]',
|
||||
|
||||
data : '$jsonList',
|
||||
type : 'select',
|
||||
indicator : 'Saving...',
|
||||
submit : 'Update Status',
|
||||
cssclass: 'MER-inplace-select',
|
||||
callback : function(value, settings) {
|
||||
|
||||
var match = /won/i.test(value);
|
||||
|
||||
if(match == true) {
|
||||
\$('#row$enqid').removeClass().addClass('jobwon');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /lost/i.test(value);
|
||||
|
||||
if(match == true) {
|
||||
\$('#row$enqid').removeClass().addClass('joblost');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /cancelled/i.test(value);
|
||||
|
||||
if(match == true) {
|
||||
\$('#row$enqid').removeClass().addClass('joblost');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /information sent/i.test(value);
|
||||
if(match == true) {
|
||||
\$('#row$enqid').removeClass().addClass('informationsent');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /issued/i.test(value);
|
||||
if(match == true) {
|
||||
\$('#row$enqid').removeClass().addClass('quoted');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /request for quotation/i.test(value);
|
||||
if(match == true) {
|
||||
\$('#row$enqid').removeClass().addClass('requestforquote');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /assigned/i.test(value);
|
||||
if(match == true) {
|
||||
\$('#row$enqid').removeClass();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
ENDJS;
|
||||
|
||||
echo $javascript->codeBlock($jsblock);
|
||||
?>
|
||||
</td>
|
||||
<td class="comments"><?
|
||||
if(strlen($enquiry['Enquiry']['comments']) > 150) {
|
||||
echo substr($enquiry['Enquiry']['comments'], 0, 150);
|
||||
echo $html->link('.....', array('controller'=>'enquiries','action'=>'view', $enquiry['Enquiry']['id']));
|
||||
}
|
||||
else {
|
||||
echo $enquiry['Enquiry']['comments'];
|
||||
}
|
||||
;?></td>
|
||||
<td class="viewedit">
|
||||
<?php echo $html->link(__('View', true), array('controller'=>'enquiries','action'=>'view', $enquiry['Enquiry']['id'])); ?>
|
||||
<?php echo $html->link(__('Edit', true), array('controller'=>'enquiries','action'=>'edit', $enquiry['Enquiry']['id'])); ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++; ?>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
||||
<div class="paging">
|
||||
|
||||
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
||||
| <?php echo $paginator->numbers();?>
|
||||
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class'=>'disabled'));?>
|
||||
<?php echo $paginator->prev('<< ' . __('previous', true), array(), null, array('class' => 'disabled')); ?>
|
||||
| <?php echo $paginator->numbers(); ?>
|
||||
<?php echo $paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled')); ?>
|
||||
</div>
|
||||
<div id="statusJSONlist" style="display: none;"><?= $status_list; ?></div>
|
||||
<div id="statusClassNames" style="display: none;"><?=$class_names;?></div>
|
||||
|
||||
<? //debug($enquiries);?>
|
||||
<?
|
||||
//debug($enquiries);?>
|
||||
|
|
@ -1 +1 @@
|
|||
<?php echo $enquiry['Status']['name']; ?>
|
||||
<?php echo $enquiry['Status']['id']; ?>
|
||||
|
|
@ -1,71 +1,37 @@
|
|||
|
||||
$(function() {
|
||||
|
||||
var statusNamesJSON = $("#statusJSONlist").html();
|
||||
|
||||
var statusNames = $.parseJSON(statusNamesJSON);
|
||||
|
||||
var classNamesJSON = $("#statusClassNames").html();
|
||||
|
||||
var classNames = $.parseJSON(classNamesJSON);
|
||||
|
||||
|
||||
$('#$enqid').editable('/enquiries/update_status', {
|
||||
id : 'data[Enquiry][id]',
|
||||
name: 'data[Enquiry][status_id]',
|
||||
$('.status').editable('/enquiries/update_status', {
|
||||
id : 'data[Enquiry][id]',
|
||||
name: 'data[Enquiry][status_id]',
|
||||
|
||||
data : '$jsonList',
|
||||
type : 'select',
|
||||
indicator : 'Saving...',
|
||||
submit : 'Update Status',
|
||||
cssclass: 'MER-inplace-select',
|
||||
callback : function(value, settings) {
|
||||
data : $("#statusJSONlist").html(),
|
||||
type : 'select',
|
||||
indicator : 'Saving...',
|
||||
submit : 'Update Status',
|
||||
cssclass: 'MER-inplace-select',
|
||||
callback : function(value, settings) {
|
||||
var thisStatusID = value;
|
||||
|
||||
var newName = statusNames[thisStatusID];
|
||||
|
||||
var id = $(this).attr('id');
|
||||
$(this).html(newName);
|
||||
|
||||
var newClass = classNames[thisStatusID];
|
||||
|
||||
$("#row"+id).removeClass().addClass(newClass);
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
var match = /won/i.test(value);
|
||||
|
||||
if(match == true) {
|
||||
$('#row$enqid').removeClass().addClass('jobwon');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /lost/i.test(value);
|
||||
|
||||
if(match == true) {
|
||||
$('#row$enqid').removeClass().addClass('joblost');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /cancelled/i.test(value);
|
||||
|
||||
if(match == true) {
|
||||
$('#row$enqid').removeClass().addClass('joblost');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /information sent/i.test(value);
|
||||
if(match == true) {
|
||||
$('#row$enqid').removeClass().addClass('informationsent');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /issued/i.test(value);
|
||||
if(match == true) {
|
||||
$('#row$enqid').removeClass().addClass('quoted');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /request for quotation/i.test(value);
|
||||
if(match == true) {
|
||||
$('#row$enqid').removeClass().addClass('requestforquote');
|
||||
return;
|
||||
}
|
||||
|
||||
match = /assigned/i.test(value);
|
||||
if(match == true) {
|
||||
$('#row$enqid').removeClass();
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function makeEditable(selectedID) {
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue