Max Red - Create system and staff fixtures for last-events and get-logs [skip ci]
This commit is contained in:
parent
bfd01dfc36
commit
6ddac56bc5
|
@ -1057,5 +1057,106 @@ module.exports = [
|
|||
data: {}
|
||||
};
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/staff/last-events',
|
||||
time: 30,
|
||||
response: function() {
|
||||
return {
|
||||
status: 'success',
|
||||
data: [
|
||||
{
|
||||
"type": "COMMENT",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Tyrion Lannister",
|
||||
"staff": false,
|
||||
"id": "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "RE_OPEN",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Tyrion Lannister",
|
||||
"staff": false,
|
||||
"id": "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "CLOSE",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarke",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "DEPARTMENT_CHANGED",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarke",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "PRIORITY_CHANGED",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarke",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ASSIGN",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarke",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "UN_ASSIGN",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarke",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "COMMENT",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarke",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ASSIGN",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarke",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "PRIORITY_CHANGED",
|
||||
"ticketNumber": "608120",
|
||||
"author": {
|
||||
"name": "Emilia Clarke",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
];
|
||||
|
|
|
@ -116,5 +116,106 @@ module.exports = [
|
|||
]
|
||||
};
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/system/get-logs',
|
||||
time: 30,
|
||||
response: function() {
|
||||
return {
|
||||
status: 'success',
|
||||
data: [
|
||||
{
|
||||
"type": "COMMENT",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Julieta Lannister",
|
||||
"staff": false,
|
||||
"id": "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "RE_OPEN",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Elizabelth Lannister",
|
||||
"staff": false,
|
||||
"id": "10"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "CLOSE",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarker",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "DEPARTMENT_CHANGED",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarker",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "PRIORITY_CHANGED",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarker",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ASSIGN",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarker",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "UN_ASSIGN",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarker",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "COMMENT",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarker",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "ASSIGN",
|
||||
"ticketNumber": "683061",
|
||||
"author": {
|
||||
"name": "Emilia Clarker",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "PRIORITY_CHANGED",
|
||||
"ticketNumber": "608120",
|
||||
"author": {
|
||||
"name": "Emilia Clarker",
|
||||
"staff": true,
|
||||
"id": "1"
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
}
|
||||
}
|
||||
];
|
||||
|
|
|
@ -67,6 +67,7 @@ class Ticketevent extends DataStore {
|
|||
'ticketNumber' => $this->ticket->ticketNumber,
|
||||
'author' => [
|
||||
'name' => $user->name,
|
||||
'staff' => $user instanceOf Staff,
|
||||
'id' => $user->id
|
||||
]
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue