Merge branch 'issue-12' into 'develop'
Fix #12 Closes #12 See merge request ldc-web/projets/support-web!23
This commit is contained in:
commit
3bbe160e20
3 changed files with 10 additions and 2 deletions
|
|
@ -6,13 +6,21 @@ use Kwaadpepper\Enum\BaseEnumRoutable;
|
|||
|
||||
/**
|
||||
* @method static self new()
|
||||
* Nouveau ticket
|
||||
* @method static self estimateTodo()
|
||||
* Devis à faire.
|
||||
* @method static self takenInAccount()
|
||||
* Nouveau ticket à été pris en charge
|
||||
* @method static self waiting()
|
||||
* On attend que le client réponde dans le ticket
|
||||
* @method static self waitingValidation()
|
||||
* On attend que le client valide l'estimation
|
||||
* @method static self recette()
|
||||
* Est mis en recette
|
||||
* @method static self production()
|
||||
* Est mis en production
|
||||
* @method static self archived()
|
||||
* Ticket fermé
|
||||
*/
|
||||
class TicketStatus extends BaseEnumRoutable
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ class AutoCloseOldTickets
|
|||
$message = 'En l\'absence d\'activitée depuis 15 jours ce ticket est automatiquement clos et archivé.';
|
||||
$tickets = Ticket::where(function ($q) {
|
||||
$q->where('status', TicketStatus::production())
|
||||
->orWhere('status', TicketStatus::processed());
|
||||
->orWhere('status', TicketStatus::waitingValidation())
|
||||
})->whereDate('updated_at', '<=', Carbon::now()->subDays($limitDays))
|
||||
->whereDoesntHave('messages', function ($q) use ($limitDays) {
|
||||
$q->whereDate('updated_at', '>', Carbon::now()->subDays($limitDays));
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class WarnBeforeAutoCloseTicket
|
|||
$messageToUser = 'En l\'absence d\'activitée, ou de réponse de votre part ce ticket sera automatiquement clos et archivé dans %s jours.';
|
||||
$tickets = Ticket::where(function ($q) {
|
||||
$q->where('status', TicketStatus::production())
|
||||
->orWhere('status', TicketStatus::processed());
|
||||
->orWhere('status', TicketStatus::waitingValidation())
|
||||
})->whereDate('updated_at', '<=', Carbon::now()->subDays($warningDays))
|
||||
->whereDoesntHave('messages', function ($q) use ($warningDays) {
|
||||
$q->whereDate('updated_at', '>', Carbon::now()->subDays($warningDays));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue