Skip to content

Commit 56bad83

Browse files
authored
Merge pull request #17 from nextdeveloper-nl/dev
Support ticket comments perspective added
2 parents 1137093 + 8082efc commit 56bad83

22 files changed

Lines changed: 1513 additions & 11 deletions

config/model-binding.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,5 +69,25 @@
6969
return NextDeveloper\Support\Database\Models\SupportTicketComment::findByRef($value);
7070
},
7171

72+
'supportticket' => function ($value) {
73+
return NextDeveloper\Support\Database\Models\SupportTicket::findByRef($value);
74+
},
75+
76+
'supportticketaudit' => function ($value) {
77+
return NextDeveloper\Support\Database\Models\SupportTicketAudit::findByRef($value);
78+
},
79+
80+
'supporttest' => function ($value) {
81+
return NextDeveloper\Support\Database\Models\SupportTest::findByRef($value);
82+
},
83+
84+
'supportticketcomment' => function ($value) {
85+
return NextDeveloper\Support\Database\Models\SupportTicketComment::findByRef($value);
86+
},
87+
88+
'supportticketcommentsperspective' => function ($value) {
89+
return NextDeveloper\Support\Database\Models\SupportTicketCommentsPerspective::findByRef($value);
90+
},
91+
7292
// EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE
7393
];

src/Database/Filters/TestsQueryFilter.php

Lines changed: 60 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,25 @@ public function name($value)
2222
{
2323
return $this->builder->where('name', 'like', '%' . $value . '%');
2424
}
25-
25+
26+
2627
public function result($value)
2728
{
2829
return $this->builder->where('result', 'like', '%' . $value . '%');
2930
}
3031

31-
public function isPassed()
32+
33+
public function isPassed($value)
3234
{
33-
return $this->builder->where('is_passed', true);
35+
return $this->builder->where('is_passed', $value);
3436
}
3537

38+
// This is an alias function of isPassed
39+
public function is_passed($value)
40+
{
41+
return $this->isPassed($value);
42+
}
43+
3644
public function createdAtStart($date)
3745
{
3846
return $this->builder->where('created_at', '>=', $date);
@@ -43,6 +51,18 @@ public function createdAtEnd($date)
4351
return $this->builder->where('created_at', '<=', $date);
4452
}
4553

54+
// This is an alias function of createdAt
55+
public function created_at_start($value)
56+
{
57+
return $this->createdAtStart($value);
58+
}
59+
60+
// This is an alias function of createdAt
61+
public function created_at_end($value)
62+
{
63+
return $this->createdAtEnd($value);
64+
}
65+
4666
public function updatedAtStart($date)
4767
{
4868
return $this->builder->where('updated_at', '>=', $date);
@@ -53,6 +73,18 @@ public function updatedAtEnd($date)
5373
return $this->builder->where('updated_at', '<=', $date);
5474
}
5575

76+
// This is an alias function of updatedAt
77+
public function updated_at_start($value)
78+
{
79+
return $this->updatedAtStart($value);
80+
}
81+
82+
// This is an alias function of updatedAt
83+
public function updated_at_end($value)
84+
{
85+
return $this->updatedAtEnd($value);
86+
}
87+
5688
public function deletedAtStart($date)
5789
{
5890
return $this->builder->where('deleted_at', '>=', $date);
@@ -63,6 +95,18 @@ public function deletedAtEnd($date)
6395
return $this->builder->where('deleted_at', '<=', $date);
6496
}
6597

98+
// This is an alias function of deletedAt
99+
public function deleted_at_start($value)
100+
{
101+
return $this->deletedAtStart($value);
102+
}
103+
104+
// This is an alias function of deletedAt
105+
public function deleted_at_end($value)
106+
{
107+
return $this->deletedAtEnd($value);
108+
}
109+
66110
public function supportTicketId($value)
67111
{
68112
$supportTicket = \NextDeveloper\Support\Database\Models\Tickets::where('uuid', $value)->first();
@@ -72,6 +116,12 @@ public function supportTicketId($value)
72116
}
73117
}
74118

119+
// This is an alias function of supportTicket
120+
public function support_ticket_id($value)
121+
{
122+
return $this->supportTicket($value);
123+
}
124+
75125
public function commonActionId($value)
76126
{
77127
$commonAction = \NextDeveloper\Commons\Database\Models\Actions::where('uuid', $value)->first();
@@ -81,7 +131,14 @@ public function commonActionId($value)
81131
}
82132
}
83133

134+
// This is an alias function of commonAction
135+
public function common_action_id($value)
136+
{
137+
return $this->commonAction($value);
138+
}
139+
84140
// EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE
85141

86142

143+
87144
}

src/Database/Filters/TicketAuditsQueryFilter.php

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function comments($value)
2323
return $this->builder->where('comments', 'like', '%' . $value . '%');
2424
}
2525

26+
2627
public function point($value)
2728
{
2829
$operator = substr($value, 0, 1);
@@ -36,6 +37,7 @@ public function point($value)
3637
return $this->builder->where('point', $operator, $value);
3738
}
3839

40+
3941
public function createdAtStart($date)
4042
{
4143
return $this->builder->where('created_at', '>=', $date);
@@ -46,6 +48,18 @@ public function createdAtEnd($date)
4648
return $this->builder->where('created_at', '<=', $date);
4749
}
4850

51+
// This is an alias function of createdAt
52+
public function created_at_start($value)
53+
{
54+
return $this->createdAtStart($value);
55+
}
56+
57+
// This is an alias function of createdAt
58+
public function created_at_end($value)
59+
{
60+
return $this->createdAtEnd($value);
61+
}
62+
4963
public function updatedAtStart($date)
5064
{
5165
return $this->builder->where('updated_at', '>=', $date);
@@ -56,6 +70,18 @@ public function updatedAtEnd($date)
5670
return $this->builder->where('updated_at', '<=', $date);
5771
}
5872

73+
// This is an alias function of updatedAt
74+
public function updated_at_start($value)
75+
{
76+
return $this->updatedAtStart($value);
77+
}
78+
79+
// This is an alias function of updatedAt
80+
public function updated_at_end($value)
81+
{
82+
return $this->updatedAtEnd($value);
83+
}
84+
5985
public function deletedAtStart($date)
6086
{
6187
return $this->builder->where('deleted_at', '>=', $date);
@@ -66,6 +92,18 @@ public function deletedAtEnd($date)
6692
return $this->builder->where('deleted_at', '<=', $date);
6793
}
6894

95+
// This is an alias function of deletedAt
96+
public function deleted_at_start($value)
97+
{
98+
return $this->deletedAtStart($value);
99+
}
100+
101+
// This is an alias function of deletedAt
102+
public function deleted_at_end($value)
103+
{
104+
return $this->deletedAtEnd($value);
105+
}
106+
69107
public function iamUserId($value)
70108
{
71109
$iamUser = \NextDeveloper\IAM\Database\Models\Users::where('uuid', $value)->first();
@@ -75,7 +113,9 @@ public function iamUserId($value)
75113
}
76114
}
77115

116+
78117
// EDIT AFTER HERE - WARNING: ABOVE THIS LINE MAY BE REGENERATED AND YOU MAY LOSE CODE
79118

80119

120+
81121
}

0 commit comments

Comments
 (0)