removed abbr. of variable, changed variable types in migration
This commit is contained in:
parent
8b52d5da85
commit
b9986033cc
8 changed files with 20 additions and 20 deletions
|
@ -311,7 +311,7 @@ class AcceptanceController extends Controller
|
||||||
'item_tag' => $item->asset_tag,
|
'item_tag' => $item->asset_tag,
|
||||||
'item_model' => $display_model,
|
'item_model' => $display_model,
|
||||||
'item_serial' => $item->serial,
|
'item_serial' => $item->serial,
|
||||||
'declined_msg' => $request->input('declined_msg'),
|
'declined_message' => $request->input('declined_message'),
|
||||||
'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'),
|
'declined_date' => Carbon::parse($acceptance->declined_at)->format('Y-m-d'),
|
||||||
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
|
'signature' => ($sig_filename) ? storage_path() . '/private_uploads/signatures/' . $sig_filename : null,
|
||||||
'assigned_to' => $assigned_to,
|
'assigned_to' => $assigned_to,
|
||||||
|
@ -325,7 +325,7 @@ class AcceptanceController extends Controller
|
||||||
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf->output());
|
Storage::put('private_uploads/eula-pdfs/' .$pdf_filename, $pdf->output());
|
||||||
}
|
}
|
||||||
|
|
||||||
$acceptance->decline($sig_filename, $request->input('declined_msg'));
|
$acceptance->decline($sig_filename, $request->input('declined_message'));
|
||||||
$acceptance->notify(new AcceptanceAssetDeclinedNotification($data));
|
$acceptance->notify(new AcceptanceAssetDeclinedNotification($data));
|
||||||
event(new CheckoutDeclined($acceptance));
|
event(new CheckoutDeclined($acceptance));
|
||||||
$return_msg = trans('admin/users/message.declined');
|
$return_msg = trans('admin/users/message.declined');
|
||||||
|
|
|
@ -78,7 +78,7 @@ class LogListener
|
||||||
$logaction->item()->associate($event->acceptance->checkoutable);
|
$logaction->item()->associate($event->acceptance->checkoutable);
|
||||||
$logaction->target()->associate($event->acceptance->assignedTo);
|
$logaction->target()->associate($event->acceptance->assignedTo);
|
||||||
$logaction->accept_signature = $event->acceptance->signature_filename;
|
$logaction->accept_signature = $event->acceptance->signature_filename;
|
||||||
$logaction->note = $event->acceptance->declined_msg;
|
$logaction->note = $event->acceptance->declined_message;
|
||||||
$logaction->action_type = 'declined';
|
$logaction->action_type = 'declined';
|
||||||
|
|
||||||
// TODO: log the actual license seat that was checked out
|
// TODO: log the actual license seat that was checked out
|
||||||
|
|
|
@ -99,10 +99,10 @@ class CheckoutAcceptance extends Model
|
||||||
*
|
*
|
||||||
* @param string $signature_filename
|
* @param string $signature_filename
|
||||||
*/
|
*/
|
||||||
public function decline($signature_filename, $declined_msg = null)
|
public function decline($signature_filename, $declined_message = null)
|
||||||
{
|
{
|
||||||
$this->declined_at = now();
|
$this->declined_at = now();
|
||||||
$this->declined_msg = $declined_msg;
|
$this->declined_message = $declined_message;
|
||||||
$this->signature_filename = $signature_filename;
|
$this->signature_filename = $signature_filename;
|
||||||
$this->save();
|
$this->save();
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ class AcceptanceAssetDeclinedNotification extends Notification
|
||||||
$this->item_model = $params['item_model'];
|
$this->item_model = $params['item_model'];
|
||||||
$this->item_serial = $params['item_serial'];
|
$this->item_serial = $params['item_serial'];
|
||||||
$this->declined_date = Helper::getFormattedDateObject($params['declined_date'], 'date', false);
|
$this->declined_date = Helper::getFormattedDateObject($params['declined_date'], 'date', false);
|
||||||
$this->declined_msg = $params['declined_msg'];
|
$this->declined_message = $params['declined_message'];
|
||||||
$this->assigned_to = $params['assigned_to'];
|
$this->assigned_to = $params['assigned_to'];
|
||||||
$this->company_name = $params['company_name'];
|
$this->company_name = $params['company_name'];
|
||||||
$this->settings = Setting::getSettings();
|
$this->settings = Setting::getSettings();
|
||||||
|
@ -63,7 +63,7 @@ class AcceptanceAssetDeclinedNotification extends Notification
|
||||||
'item_tag' => $this->item_tag,
|
'item_tag' => $this->item_tag,
|
||||||
'item_model' => $this->item_model,
|
'item_model' => $this->item_model,
|
||||||
'item_serial' => $this->item_serial,
|
'item_serial' => $this->item_serial,
|
||||||
'declined_msg' => $this->declined_msg,
|
'declined_message' => $this->declined_message,
|
||||||
'declined_date' => $this->declined_date,
|
'declined_date' => $this->declined_date,
|
||||||
'assigned_to' => $this->assigned_to,
|
'assigned_to' => $this->assigned_to,
|
||||||
'company_name' => $this->company_name,
|
'company_name' => $this->company_name,
|
||||||
|
|
|
@ -14,7 +14,7 @@ class AddDeclineMsgToCheckoutAcceptanceTable extends Migration
|
||||||
public function up()
|
public function up()
|
||||||
{
|
{
|
||||||
Schema::table('checkout_acceptances', function (Blueprint $table) {
|
Schema::table('checkout_acceptances', function (Blueprint $table) {
|
||||||
$table->string('declined_msg')->after('signature_filename')->nullable();
|
$table->text('declined_message')->after('signature_filename')->nullable();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ class AddDeclineMsgToCheckoutAcceptanceTable extends Migration
|
||||||
public function down()
|
public function down()
|
||||||
{
|
{
|
||||||
Schema::table('checkout_acceptances', function (Blueprint $table) {
|
Schema::table('checkout_acceptances', function (Blueprint $table) {
|
||||||
$table->dropColumn('declined_msg');
|
$table->dropColumn('declined_message');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@ return [
|
||||||
'default_eula_text' => 'Default EULA',
|
'default_eula_text' => 'Default EULA',
|
||||||
'default_language' => 'Default Language',
|
'default_language' => 'Default Language',
|
||||||
'default_eula_help_text' => 'You can also associate custom EULAs to specific asset categories.',
|
'default_eula_help_text' => 'You can also associate custom EULAs to specific asset categories.',
|
||||||
'decline_msg' => 'Add details to why you can\'t accept this (Optional)',
|
'decline_message' => 'Add details to why you can\'t accept this (Optional)',
|
||||||
'display_asset_name' => 'Display Asset Name',
|
'display_asset_name' => 'Display Asset Name',
|
||||||
'display_checkout_date' => 'Display Checkout Date',
|
'display_checkout_date' => 'Display Checkout Date',
|
||||||
'display_eol' => 'Display EOL in table view',
|
'display_eol' => 'Display EOL in table view',
|
||||||
|
|
|
@ -293,7 +293,7 @@ return [
|
||||||
'user' => 'User',
|
'user' => 'User',
|
||||||
'accepted' => 'accepted',
|
'accepted' => 'accepted',
|
||||||
'declined' => 'declined',
|
'declined' => 'declined',
|
||||||
'declined_note' => 'Declined Notes',
|
'declined_note' => 'Declined Notes',
|
||||||
'unassigned' => 'Unassigned',
|
'unassigned' => 'Unassigned',
|
||||||
'unaccepted_asset_report' => 'Unaccepted Assets',
|
'unaccepted_asset_report' => 'Unaccepted Assets',
|
||||||
'users' => 'Users',
|
'users' => 'Users',
|
||||||
|
|
|
@ -67,10 +67,10 @@
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<br>
|
<br>
|
||||||
<div class="col-md-12" style="display:block;">
|
<div class="col-md-12" style="display:block;">
|
||||||
<label id="declined_msg_label" for="declined_msg" style="text-align:center;">{{trans('admin/settings/general.decline_msg')}}</label>
|
<label id="declined_message_label" for="declined_message" style="text-align:center;" >{{trans('admin/settings/general.decline_message')}}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<textarea id="declined_msg" name="declined_msg" rows="4" cols="50" value="decline_msg"></textarea>
|
<textarea id="declined_message" name="declined_message" rows="4" cols="50" value="declined_message" ></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -104,20 +104,20 @@
|
||||||
|
|
||||||
<script nonce="{{ csrf_token() }}">
|
<script nonce="{{ csrf_token() }}">
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
// Initially hide the div
|
|
||||||
$('#declined_msg').hide();
|
$('#declined_message').hide();
|
||||||
$('#declined_msg_label').hide();
|
$('#declined_message_label').hide();
|
||||||
|
|
||||||
|
|
||||||
$('input[id="declined"]').change(function(){
|
$('input[id="declined"]').change(function(){
|
||||||
|
|
||||||
if($(this).is(':checked')){
|
if($(this).is(':checked')){
|
||||||
$('#declined_msg_label').show();
|
$('#declined_message_label').show();
|
||||||
$('#declined_msg').show();
|
$('#declined_message').show();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#declined_msg_label').hide();
|
$('#declined_message_label').hide();
|
||||||
$('#declined_msg').hide();
|
$('#declined_message').hide();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue