Skip to content

Commit

Permalink
up
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv authored and Malebestia committed Sep 4, 2023
1 parent 5e2641d commit 15b40ee
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion Actions/ApplyModelAttrsToThemeAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function execute(Model $model, string $name, array $extra, ?Collection $o
$html = $theme->body_html;
$html = $this->replacer($model, $extra, $html);

$theme->mail_body = $html;
$theme->body_html = $html;

return $theme;
}
Expand Down
4 changes: 2 additions & 2 deletions Models/Panels/NotificationPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public function search(): array {
* quando aggiungi un campo select, è il numero della chiave
* che viene messo come valore su value="id"
*
* @param Modules\Notify\Models\Notification $row
* @param \Modules\Notify\Models\Notification $row
*
* @return int|string|null
*/
Expand Down Expand Up @@ -128,4 +128,4 @@ public function lenses(Request $request): array {
public function actions(): array {
return [];
}
}
}
11 changes: 9 additions & 2 deletions Models/Panels/NotifyThemeablePanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ public function search(): array {
* quando aggiungi un campo select, è il numero della chiave
* che viene messo come valore su value="id"
*
<<<<<<< Updated upstream
* @param NotifyThemeable $row
=======
* @param \Modules\Notify\Models\NotifyThemeable $row
>>>>>>> Stashed changes
*
* @return int|string|null
*/
Expand All @@ -56,9 +60,12 @@ public function optionId($row) {

/**
* on select the option label.
*
* @param \Modules\Notify\Models\NotifyThemeable $row
*
*/
public function optionLabel($row): string {
return (string) $row->title;
return '';
}

/**
Expand Down Expand Up @@ -157,4 +164,4 @@ public function lenses(Request $request): array {
public function actions(): array {
return [];
}
}
}
15 changes: 1 addition & 14 deletions Notifications/RowAttributeNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,6 @@ public function __construct(Model $row) {
* @return array
*/
public function via($notifiable) {
/*
dddx(['via'=>$this->row->getNotifyVia(),'notifiable'=>$notifiable,'row'=>$this->row]);
return ['mail'];
*/
return $this->row->getNotifyVia();
}

Expand All @@ -51,16 +47,7 @@ public function toMail($notifiable) {
->line('---')
// non so se posso modificare questa riga senza creare errori in altre parti
->view('notify::emails.templates.ark.mail', ['html' => $this->row->mail_body]);
// ->view('notify::emails.templates.'.$this->row->mail_theme, ['html' => $this->row->mail_body]);

/*
$up=[
'mail_sent_at' => now(),
'mail_count' => (int) $this->row->email_count + 1,
];
$this->row->update($up);
*/

$this->row->sendEmailCallback();

return $message;
Expand Down

0 comments on commit 15b40ee

Please sign in to comment.