partial #2350 - Create an option to assign drivers per community

This commit is contained in:
Daniel Camargo 2014-02-06 18:01:37 -02:00
parent da1a87a67c
commit aa917afeb2
2 changed files with 26 additions and 13 deletions

View File

@ -826,6 +826,8 @@ class Crunchbutton_Order extends Cana_Table {
}
}
// check if the restaurant is using our delivery system
if( intval( $order->restaurant()->delivery_service ) == 1 ){
// get the restaurant community and its drivers
$community = $order->restaurant()->community;
if( $community ){
@ -837,6 +839,7 @@ class Crunchbutton_Order extends Cana_Table {
}
}
}
}
// Send notification to drivers
if( count( $driversToNotify ) > 0 ){

View File

@ -15,11 +15,21 @@ $groups = $this->groups;
<tr>
<td><?php echo $group->name;?> </td>
<td><?php echo $group->description;?> </td>
<td><?php echo $group->usersTotal();?> </td>
<td><?php echo $group->usersTotal();?>
</td>
<?php
// verify if it is an system group
$pos = strrpos( $group->name, Crunchbutton_Group::DRIVER_GROUPS_PREFIX );
?>
<td style="width:280px;">
<?php if( $pos === false ) { ?>
<a href="/permissions/groups/permissions/<?php echo $group->id_group; ?>" class="btn btn-blue"><i class="icon-unlock"></i> Permissions</a>
&nbsp;
<a href="/permissions/groups/<?php echo $group->id_group; ?>" class="btn btn-green"><i class="icon-edit"></i> Edit</a>
<?php } else { ?>
<i style="font-size:11px;">This group could not be modified</i>
<?php } ?>
&nbsp;
<button data-id="<?php echo $group->id_group; ?>" class="btn group-remove btn-red"><i class="icon-trash"></i> Remove</button>
</td>