Add code to ticket and subticket types. #680
This commit is contained in:
parent
50ce917a1a
commit
c63b9ffe43
8 changed files with 70 additions and 9 deletions
|
|
@ -247,6 +247,7 @@ class SubTicketTypeController extends Controller
|
|||
|
||||
// set and save values
|
||||
$obj->setName($req->request->get('name'))
|
||||
->setCode($req->request->get('code'))
|
||||
->setTicketType($ttype);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -240,7 +240,8 @@ class TicketTypeController extends Controller
|
|||
protected function setObject(TicketType $obj, Request $req)
|
||||
{
|
||||
// set and save values
|
||||
$obj->setName($req->request->get('name'));
|
||||
$obj->setName($req->request->get('name'))
|
||||
->setCode($req->request->get('code'));
|
||||
}
|
||||
|
||||
protected function setQueryFilters($datatable, QueryBuilder $query)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="subticket_type")
|
||||
* @ORM\Table(name="subticket_type", indexes={
|
||||
* @ORM\Index(name="subticket_type_idx", columns={"code"}),
|
||||
* })
|
||||
*/
|
||||
class SubTicketType
|
||||
{
|
||||
|
|
@ -20,6 +22,12 @@ class SubTicketType
|
|||
*/
|
||||
protected $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=80)
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
protected $code;
|
||||
|
||||
// name
|
||||
/**
|
||||
* @ORM\Column(type="string", length=80)
|
||||
|
|
@ -60,4 +68,15 @@ class SubTicketType
|
|||
{
|
||||
return $this->ticket_type;
|
||||
}
|
||||
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->code = $code;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCode()
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ use Symfony\Component\Validator\Constraints as Assert;
|
|||
|
||||
/**
|
||||
* @ORM\Entity
|
||||
* @ORM\Table(name="ticket_type")
|
||||
* @ORM\Table(name="ticket_type", indexes={
|
||||
* @ORM\Index(name="ticket_type_idx", columns={"code"}),
|
||||
* })
|
||||
*/
|
||||
class TicketType
|
||||
|
|
@ -22,7 +23,13 @@ class TicketType
|
|||
protected $id;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=25)a
|
||||
* @ORM\Column(type="string", length=25)
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
protected $code;
|
||||
|
||||
/**
|
||||
* @ORM\Column(type="string", length=25)
|
||||
* @Assert\NotBlank()
|
||||
*/
|
||||
protected $name;
|
||||
|
|
@ -42,4 +49,15 @@ class TicketType
|
|||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setCode($code)
|
||||
{
|
||||
$this->code = $code;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getCode()
|
||||
{
|
||||
return $this->code;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,6 +43,15 @@
|
|||
<div class="form-control-feedback hide" data-field="name"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group m-form__group row no-border">
|
||||
<label class="col-lg-3 col-form-label" data-field="code">
|
||||
Code:
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" name="code" class="form-control m-input" value="{{ subticket_type.getCode() }}">
|
||||
<div class="form-control-feedback hide" data-field="code"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group m-form__group row">
|
||||
<label class="col-lg-3 col-form-label" data-field="name">
|
||||
Ticket Type:
|
||||
|
|
|
|||
|
|
@ -34,6 +34,15 @@
|
|||
</div>
|
||||
<form id="row-form" class="m-form m-form--fit m-form--label-align-right m-form--group-seperator-dashed" method="post" action="{{ mode == 'update' ? url('ticket_type_update_submit', {'id': ticket_type.getId()}) : url('ticket_type_add_submit') }}">
|
||||
<div class="m-portlet__body">
|
||||
<div class="form-group m-form__group row no-border">
|
||||
<label class="col-lg-3 col-form-label" data-field="code">
|
||||
Code:
|
||||
</label>
|
||||
<div class="col-lg-9">
|
||||
<input type="text" name="code" class="form-control m-input" value="{{ ticket_type.getCode() }}">
|
||||
<div class="form-control-feedback hide" data-field="code"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group m-form__group row">
|
||||
<label class="col-lg-3 col-form-label" data-field="name">
|
||||
Name:
|
||||
|
|
|
|||
|
|
@ -26,8 +26,10 @@ CREATE TABLE `subticket_type` (
|
|||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`ticket_type_id` int(11) DEFAULT NULL,
|
||||
`name` varchar(80) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`code` varchar(80) COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `IDX_F18521A4C980D5C1` (`ticket_type_id`),
|
||||
KEY `subticket_type_idx` (`code`),
|
||||
CONSTRAINT `FK_F18521A4C980D5C1` FOREIGN KEY (`ticket_type_id`) REFERENCES `ticket_type` (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
|
@ -38,7 +40,7 @@ CREATE TABLE `subticket_type` (
|
|||
|
||||
LOCK TABLES `subticket_type` WRITE;
|
||||
/*!40000 ALTER TABLE `subticket_type` DISABLE KEYS */;
|
||||
INSERT INTO `subticket_type` VALUES (1,1,'Hub / Distributor'),(2,1,'Rider / Technician'),(3,1,'Service Procedure (Incomplete Document/s)'),(4,1,'Agent'),(5,1,'Wrong Battery'),(6,2,'Delivery Time'),(7,2,'Line Up Status'),(8,2,'Recharged / Replacement Battery'),(9,3,'Battery Brand'),(10,3,'Battery Life Span'),(11,3,'Battery Price and Trade-in'),(12,3,'Battery Specifications'),(13,3,'Battery Warranty'),(14,3,'Call Out Request'),(15,3,'Dealership'),(16,3,'Distributor Call'),(17,3,'For Generator Set (GenSet)'),(18,3,'Grab'),(19,3,'Mode of Payment'),(20,3,'Motorcycle Batteries'),(21,3,'Operating Hours'),(22,3,'Outlet nearby details (Province)'),(23,3,'Pezza or EWT'),(24,3,'Promo or Discount'),(25,3,'PVC'),(26,3,'ResQ Services and Fee'),(27,3,'Service Fee'),(28,3,'Serviceable Area'),(29,3,'Shell'),(30,3,'VAT Exempt'),(31,3,'Warranty Claim / Procedures'),(32,3,'Test Call'),(33,4,'Ghost Call'),(34,4,'Line Cut'),(35,4,'System Problem'),(36,4,'Transferred Calls'),(37,4,'VPN Down');
|
||||
INSERT INTO `subticket_type` VALUES (1,1,'Hub / Distributor','hub_distributor'),(2,1,'Rider / Technician','rider_technician'),(3,1,'Service Procedure (Incomplete Document/s)','service_procedure_incomplete_documents'),(4,1,'Agent','agent'),(5,1,'Wrong Battery','wrong_battery'),(6,2,'Delivery Time','delivery_time'),(7,2,'Line Up Status','line_up_status'),(8,2,'Recharged / Replacement Battery','recharged_replacement_battery'),(9,3,'Battery Brand','battery_brand'),(10,3,'Battery Life Span','battery_life_span'),(11,3,'Battery Price and Trade-in','battery_price_and_trade_in'),(12,3,'Battery Specifications','battery_specifications'),(13,3,'Battery Warranty','battery_warranty'),(14,3,'Call Out Request','call_out_request'),(15,3,'Dealership','dealership'),(16,3,'Distributor Call','distributor_call'),(17,3,'For Generator Set (GenSet)','for_generator_set_genset'),(18,3,'Grab','grab'),(19,3,'Mode of Payment','mode_of_payment'),(20,3,'Motorcycle Batteries','motorcycle_batteries'),(21,3,'Operating Hours','operating_hours'),(22,3,'Outlet nearby details (Province)','outlet_nearby_details_province'),(23,3,'Pezza or EWT','pezza_or_ewt'),(24,3,'Promo or Discount','promo_or_discount'),(25,3,'PVC','pvc'),(26,3,'ResQ Services and Fee','resq_services_and_fee'),(27,3,'Service Fee','service_fee'),(28,3,'Serviceable Area','serviceable_area'),(29,3,'Shell','shell'),(30,3,'VAT Exempt','vat_exempt'),(31,3,'Warranty Claim / Procedures','warranty_claim_procedures'),(32,3,'Test Call','test_call'),(33,4,'Ghost Call','ghost_call'),(34,4,'Line Cut','line_cut'),(35,4,'System Problem','system_problem'),(36,4,'Transferred Calls','transferred_calls'),(37,4,'VPN Down','vpn_down');
|
||||
/*!40000 ALTER TABLE `subticket_type` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
|
@ -51,4 +53,4 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2022-06-03 9:53:08
|
||||
-- Dump completed on 2022-06-10 6:44:22
|
||||
|
|
|
|||
|
|
@ -25,7 +25,9 @@ DROP TABLE IF EXISTS `ticket_type`;
|
|||
CREATE TABLE `ticket_type` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
`code` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `ticket_type_idx` (`code`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
|
|
@ -35,7 +37,7 @@ CREATE TABLE `ticket_type` (
|
|||
|
||||
LOCK TABLES `ticket_type` WRITE;
|
||||
/*!40000 ALTER TABLE `ticket_type` DISABLE KEYS */;
|
||||
INSERT INTO `ticket_type` VALUES (1,'Complaint'),(2,'Follow up'),(3,'Inquiry'),(4,'Others');
|
||||
INSERT INTO `ticket_type` VALUES (1,'Complaint','complaint'),(2,'Follow up','follow_up'),(3,'Inquiry','inquiry'),(4,'Others','others');
|
||||
/*!40000 ALTER TABLE `ticket_type` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
|
@ -48,4 +50,4 @@ UNLOCK TABLES;
|
|||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2022-06-03 9:52:51
|
||||
-- Dump completed on 2022-06-10 6:44:12
|
||||
|
|
|
|||
Loading…
Reference in a new issue