Add new ticket and new subticket types. #695
This commit is contained in:
parent
5f94f252bc
commit
c1e33fb5dd
5 changed files with 40 additions and 8 deletions
|
|
@ -251,6 +251,9 @@ class TicketController extends Controller
|
||||||
$ttype_id = $req->request->get('new_ticket_type');
|
$ttype_id = $req->request->get('new_ticket_type');
|
||||||
$sub_ttype_id = $req->request->get('sub_ticket_type');
|
$sub_ttype_id = $req->request->get('sub_ticket_type');
|
||||||
|
|
||||||
|
// get other description if any
|
||||||
|
$other_desc = $req->request->get('other_desc');
|
||||||
|
|
||||||
// get source of awareness if any
|
// get source of awareness if any
|
||||||
$soa_type = $req->request->get('source_of_awareness');
|
$soa_type = $req->request->get('source_of_awareness');
|
||||||
|
|
||||||
|
|
@ -269,7 +272,8 @@ class TicketController extends Controller
|
||||||
->setDateCreate(new DateTime())
|
->setDateCreate(new DateTime())
|
||||||
->setCreatedBy($this->getUser())
|
->setCreatedBy($this->getUser())
|
||||||
->setSourceOfAwareness($soa_type)
|
->setSourceOfAwareness($soa_type)
|
||||||
->setRemarks($remarks);
|
->setRemarks($remarks)
|
||||||
|
->setOtherDescription($other_desc);
|
||||||
|
|
||||||
// if assigned to customer, set association
|
// if assigned to customer, set association
|
||||||
if ($customer_id) {
|
if ($customer_id) {
|
||||||
|
|
@ -458,6 +462,9 @@ class TicketController extends Controller
|
||||||
$ttype_id = $req->request->get('new_ticket_type');
|
$ttype_id = $req->request->get('new_ticket_type');
|
||||||
$sub_ttype_id = $req->request->get('sub_ticket_type');
|
$sub_ttype_id = $req->request->get('sub_ticket_type');
|
||||||
|
|
||||||
|
// get other description if any
|
||||||
|
$other_desc = $req->request->get('other_desc');
|
||||||
|
|
||||||
// get source of awareness if any
|
// get source of awareness if any
|
||||||
$soa_type = $req->request->get('source_of_awareness');
|
$soa_type = $req->request->get('source_of_awareness');
|
||||||
|
|
||||||
|
|
@ -474,7 +481,8 @@ class TicketController extends Controller
|
||||||
->setDetails($req->request->get('details'))
|
->setDetails($req->request->get('details'))
|
||||||
->setPlateNumber($req->request->get('plate_number'))
|
->setPlateNumber($req->request->get('plate_number'))
|
||||||
->setSourceOfAwareness($soa_type)
|
->setSourceOfAwareness($soa_type)
|
||||||
->setRemarks($remarks);
|
->setRemarks($remarks)
|
||||||
|
->setOtherDescription($other_desc);
|
||||||
|
|
||||||
// initialize error list
|
// initialize error list
|
||||||
$error_array = [];
|
$error_array = [];
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,12 @@ class Ticket
|
||||||
*/
|
*/
|
||||||
protected $subticket_type;
|
protected $subticket_type;
|
||||||
|
|
||||||
|
// text field for Other subticket type
|
||||||
|
/**
|
||||||
|
* @ORM\Column(type="text", nullable=true)
|
||||||
|
*/
|
||||||
|
protected $other_description;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->date_create = new DateTime();
|
$this->date_create = new DateTime();
|
||||||
|
|
@ -337,4 +343,15 @@ class Ticket
|
||||||
{
|
{
|
||||||
return $this->subticket_type;
|
return $this->subticket_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setOtherDescription($other_description)
|
||||||
|
{
|
||||||
|
$this->other_description = $other_description;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getOtherDescription()
|
||||||
|
{
|
||||||
|
return $this->other_description;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,6 +93,13 @@
|
||||||
<div class="form-control-feedback hide" data-field="sub_ticket_type"></div>
|
<div class="form-control-feedback hide" data-field="sub_ticket_type"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group m-form__group row no-border">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<label for="other_desc" data-field="remarks"> Description </label>
|
||||||
|
<textarea class="form-control m-input" id="other-desc" rows="4" name="other_desc">{{ obj.getOtherDescription }}</textarea>
|
||||||
|
<div class="form-control-feedback hide" data-field="other_desc"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<div class="form-group m-form__group row no-border">
|
<div class="form-group m-form__group row no-border">
|
||||||
<div class="col-lg-4">
|
<div class="col-lg-4">
|
||||||
<label data-field="first_name">First Name</label>
|
<label data-field="first_name">First Name</label>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -28,7 +28,7 @@ CREATE TABLE `ticket_type` (
|
||||||
`code` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
|
`code` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
KEY `ticket_type_idx` (`code`)
|
KEY `ticket_type_idx` (`code`)
|
||||||
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
@ -37,7 +37,7 @@ CREATE TABLE `ticket_type` (
|
||||||
|
|
||||||
LOCK TABLES `ticket_type` WRITE;
|
LOCK TABLES `ticket_type` WRITE;
|
||||||
/*!40000 ALTER TABLE `ticket_type` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `ticket_type` DISABLE KEYS */;
|
||||||
INSERT INTO `ticket_type` VALUES (1,'Complaint','complaint'),(2,'Follow up','follow_up'),(3,'Inquiry','inquiry'),(4,'Others','others');
|
INSERT INTO `ticket_type` VALUES (1,'Complaint','complaint'),(2,'Follow up','follow_up'),(3,'Inquiry','inquiry'),(4,'Others','others'),(5,'Yokohama OP Facebook','yokohama_op_facebook'),(6,'Yokohama Twitter','yokohama_twitter'),(7,'Yokohama Instagram','yokohama_instagram'),(8,'Yokohama Carousell','yokohama_carousell');
|
||||||
/*!40000 ALTER TABLE `ticket_type` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `ticket_type` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||||
|
|
@ -50,4 +50,4 @@ UNLOCK TABLES;
|
||||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||||
|
|
||||||
-- Dump completed on 2022-06-10 6:44:12
|
-- Dump completed on 2022-08-12 10:25:41
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue