removed translation fixed via method

This commit is contained in:
Godfrey M 2024-01-24 14:49:42 -08:00
parent 00f07ac2ce
commit c65b32bcdb
8 changed files with 14 additions and 15 deletions

View file

@ -44,7 +44,7 @@ class CheckinAccessoryNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_endpoint != '') {
if (Setting::getSettings()->webhook_selected == 'slack') {
$notifyBy[] = 'slack';
}
@ -130,7 +130,7 @@ class CheckinAccessoryNotification extends Notification
->fact(trans('mail.checked_into'), $item->location->name ? $item->location->name : '')
->fact(trans('mail.Accessory_Checkin_Notification')." by ", $admin->present()->fullName())
->fact(trans('admin/consumables/general.remaining'), $item->numRemaining())
->fact(trans('mail.notes'), $note ?: 'No notes');
->fact(trans('mail.notes'), $note ?: '');
}
/**

View file

@ -51,7 +51,7 @@ class CheckinAssetNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_endpoint != '') {
if (Setting::getSettings()->webhook_selected == 'slack') {
\Log::debug('use webhook');
$notifyBy[] = 'slack';
}
@ -106,7 +106,7 @@ class CheckinAssetNotification extends Notification
->fact(trans('mail.checked_into'), $item->location->name ? $item->location->name : '')
->fact(trans('mail.Asset_Checkin_Notification')." by ", $admin->present()->fullName())
->fact(trans('admin/hardware/form.status'), $item->assetstatus->name)
->fact(trans('mail.notes'), $note ?: trans('mail.no_notes'));
->fact(trans('mail.notes'), $note ?: '');
}
/**

View file

@ -48,7 +48,7 @@ class CheckinLicenseSeatNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_endpoint != '') {
if (Setting::getSettings()->webhook_selected == 'slack') {
$notifyBy[] = 'slack';
}
@ -108,10 +108,10 @@ class CheckinLicenseSeatNotification extends Notification
->title(trans('mail.License_Checkin_Notification'))
->addStartGroupToSection('activityText')
->fact(htmlspecialchars_decode($item->present()->name), '', 'header')
->fact(trans('mail.License_Checkin_Notification')." by ", $admin->present()->fullName() ?: 'ClI tool')
->fact(trans('mail.License_Checkin_Notification')." by ", $admin->present()->fullName() ?: 'CLI tool')
->fact(trans('mail.checkedin_from'), $target->present()->fullName())
->fact(trans('admin/consumables/general.remaining'), $item->availCount()->count())
->fact(trans('mail.notes'), $note ?: trans('mail.no_notes'));
->fact(trans('mail.notes'), $note ?: '');
}
/**

View file

@ -120,7 +120,7 @@ class CheckoutAccessoryNotification extends Notification
->fact(trans('mail.checkedout_from'), $item->location->name ? $item->location->name : '')
->fact(trans('mail.Accessory_Checkout_Notification') . " by ", $admin->present()->fullName())
->fact(trans('admin/consumables/general.remaining'), $item->numRemaining())
->fact(trans('mail.notes'), $note ?: trans('mail.no_notes'));
->fact(trans('mail.notes'), $note ?: '');
}

View file

@ -60,7 +60,7 @@ class CheckoutAssetNotification extends Notification
}
$notifyBy = [];
if ((Setting::getSettings()) && (Setting::getSettings()->webhook_endpoint != '')) {
if ((Setting::getSettings()) && (Setting::getSettings()->webhook_selected == 'slack')) {
\Log::debug('use webhook');
$notifyBy[] = 'slack';
}
@ -139,7 +139,7 @@ class CheckoutAssetNotification extends Notification
->fact(trans('mail.assigned_to'), $target->present()->name)
->fact(htmlspecialchars_decode($item->present()->name), '', 'activityText')
->fact(trans('mail.Asset_Checkout_Notification') . " by ", $admin->present()->fullName())
->fact(trans('mail.notes'), $note ?: trans('mail.no_notes'));
->fact(trans('mail.notes'), $note ?: '');
}

View file

@ -50,7 +50,7 @@ class CheckoutConsumableNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_endpoint != '') {
if (Setting::getSettings()->webhook_selected == 'slack') {
$notifyBy[] = 'slack';
}
@ -126,7 +126,7 @@ class CheckoutConsumableNotification extends Notification
->fact(trans('mail.Consumable_checkout_notification')." by ", $admin->present()->fullName())
->fact(trans('mail.assigned_to'), $target->present()->fullName())
->fact(trans('admin/consumables/general.remaining'), $item->numRemaining())
->fact(trans('mail.notes'), $note ?: trans('mail.no_notes'));
->fact(trans('mail.notes'), $note ?: '');
}
/**

View file

@ -51,7 +51,7 @@ class CheckoutLicenseSeatNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_endpoint != '') {
if (Setting::getSettings()->webhook_selected == 'slack') {
$notifyBy[] = 'slack';
}
@ -127,7 +127,7 @@ class CheckoutLicenseSeatNotification extends Notification
->fact(trans('mail.License_Checkout_Notification')." by ", $admin->present()->fullName())
->fact(trans('mail.assigned_to'), $target->present()->fullName())
->fact(trans('admin/consumables/general.remaining'), $item->availCount()->count())
->fact(trans('mail.notes'), $note ?: trans('mail.no_notes'));
->fact(trans('mail.notes'), $note ?: '');
}
/**

View file

@ -35,7 +35,6 @@ return [
'months' => 'months',
'name' => 'Asset Name',
'notes' => 'Notes',
'no_notes' => 'No Notes',
'order' => 'Order Number',
'qr' => 'QR Code',
'requestable' => 'Users may request this asset',