Skip to content

Commit 9adea66

Browse files
committed
FOUR-9333
1 parent 0b09671 commit 9adea66

5 files changed

Lines changed: 331 additions & 7 deletions

File tree

ProcessMaker/Events/CategoryCreated.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ public function getData(): array
3939
'label' => $this->variable['name'],
4040
'link' => route('processes.create', $this->category),
4141
],
42-
'name' => $this->variable['name'],
4342
'created_at' => $this->category->getAttribute('created_at'),
4443
];
4544
}

ProcessMaker/Events/CategoryDeleted.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public function __construct(ProcessCategory $data)
3131
public function getData(): array
3232
{
3333
return [
34-
'category_name' => $this->processCategory->getAttribute('name'),
34+
'name' => $this->processCategory->getAttribute('name'),
3535
'deleted_at' => Carbon::now(),
3636
];
3737
}

ProcessMaker/Events/ScreenUpdated.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,10 @@ public function getData(): array
6262
if (array_key_exists('config', $this->changes)) {
6363
return $basic;
6464
} else {
65-
return array_merge([
66-
'last_modified' => $this->screen->getAttribute('updated_at'),
67-
], ArrayHelper::getArrayDifferencesWithFormat($this->changes, $this->original));
65+
return array_merge(
66+
$basic,
67+
ArrayHelper::getArrayDifferencesWithFormat($this->changes, $this->original)
68+
);
6869
}
6970
}
7071

ProcessMaker/Events/TemplateCreated.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace ProcessMaker\Events;
44

5+
use Carbon\Carbon;
56
use Illuminate\Foundation\Events\Dispatchable;
67
use ProcessMaker\Contracts\SecurityLogEventInterface;
78

@@ -32,6 +33,7 @@ public function getData(): array
3233
'type' => $this->payload['type'] ?? '',
3334
'version' => $this->payload['version'] ?? '',
3435
'name' => $this->payload['name'] ?? '',
36+
'created_at' => $this->payload['created_at'] ?? Carbon::now(),
3537
];
3638
}
3739

0 commit comments

Comments
 (0)