Listener v1.3.0 file update and change invoice, bill show draft message
This commit is contained in:
parent
a54000932f
commit
685ccd93aa
@ -26,23 +26,6 @@ class Version130 extends Listener
|
||||
return;
|
||||
}
|
||||
|
||||
$permissions = $this->getPermissions();
|
||||
|
||||
// Attach permission to roles
|
||||
$roles = Role::all();
|
||||
|
||||
foreach ($roles as $role) {
|
||||
$allowed = ['admin'];
|
||||
|
||||
if (!in_array($role->name, $allowed)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($permissions as $permission) {
|
||||
$role->attachPermission($permission);
|
||||
}
|
||||
}
|
||||
|
||||
// Set new Item Reminder settings
|
||||
setting(['general.send_item_reminder' => '0']);
|
||||
setting(['general.schedule_item_stocks' => '3,5,7']);
|
||||
@ -60,48 +43,32 @@ class Version130 extends Listener
|
||||
{
|
||||
$permissions = [];
|
||||
|
||||
// Banking Reconciliations
|
||||
$permissions[] = Permission::firstOrCreate([
|
||||
'name' => 'read-banking-reconciliations',
|
||||
'display_name' => 'Read Banking Reconciliations',
|
||||
'description' => 'Read Banking Reconciliations',
|
||||
]);
|
||||
|
||||
$permissions[] = Permission::firstOrCreate([
|
||||
'name' => 'create-banking-reconciliations',
|
||||
'display_name' => 'Create Banking Reconciliations',
|
||||
'description' => 'Create Banking Reconciliations',
|
||||
]);
|
||||
|
||||
$permissions[] = Permission::firstOrCreate([
|
||||
'name' => 'update-banking-reconciliations',
|
||||
'display_name' => 'Update Banking Reconciliations',
|
||||
'description' => 'Update Banking Reconciliations',
|
||||
]);
|
||||
|
||||
$permissions[] = Permission::firstOrCreate([
|
||||
'name' => 'delete-banking-reconciliations',
|
||||
'display_name' => 'Delete Banking Reconciliations',
|
||||
'description' => 'Delete Banking Reconciliations',
|
||||
]);
|
||||
|
||||
// Attach permission to roles
|
||||
$roles = Role::all();
|
||||
|
||||
foreach ($roles as $role) {
|
||||
$allowed = ['admin', 'manager'];
|
||||
|
||||
if (!in_array($role->name, $allowed)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($permissions as $permission) {
|
||||
$role->attachPermission($permission);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected function getPermissions()
|
||||
{
|
||||
$permissions = [];
|
||||
|
||||
// Create permissions
|
||||
// Create Wizard Permissions
|
||||
$permissions[] = Permission::firstOrCreate([
|
||||
'name' => 'create-wizard-companies',
|
||||
'display_name' => 'Create Wizard Compaines',
|
||||
@ -126,7 +93,7 @@ class Version130 extends Listener
|
||||
'description' => 'Create Wizard Finish',
|
||||
]);
|
||||
|
||||
// Read permissions
|
||||
// Read Wizard Permissions
|
||||
$permissions[] = Permission::firstOrCreate([
|
||||
'name' => 'read-wizard-companies',
|
||||
'display_name' => 'Read Wizard Compaines',
|
||||
@ -151,7 +118,7 @@ class Version130 extends Listener
|
||||
'description' => 'Read Wizard Finish',
|
||||
]);
|
||||
|
||||
// Update permissions
|
||||
// Update Wizard Permissions
|
||||
$permissions[] = Permission::firstOrCreate([
|
||||
'name' => 'update-wizard-companies',
|
||||
'display_name' => 'Update Wizard Compaines',
|
||||
@ -176,6 +143,19 @@ class Version130 extends Listener
|
||||
'description' => 'Update Wizard Finish',
|
||||
]);
|
||||
|
||||
return $permissions;
|
||||
// Attach permission to roles
|
||||
$roles = Role::all();
|
||||
|
||||
foreach ($roles as $role) {
|
||||
$allowed = ['admin', 'manager'];
|
||||
|
||||
if (!in_array($role->name, $allowed)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach ($permissions as $permission) {
|
||||
$role->attachPermission($permission);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ return [
|
||||
|
||||
'messages' => [
|
||||
'received' => 'Bill marked as received successfully!',
|
||||
'draft' => 'This is a <b>DRAFT</b> bill and will be reflected to charts once it gets receive.',
|
||||
'draft' => 'This is a <b>DRAFT</b> bill and will be reflected to charts after it gets receive.',
|
||||
|
||||
'status' => [
|
||||
'created' => 'Created on :date',
|
||||
|
@ -46,7 +46,7 @@ return [
|
||||
'email_sent' => 'Invoice email has been sent successfully!',
|
||||
'marked_sent' => 'Invoice marked as sent successfully!',
|
||||
'email_required' => 'No email address for this customer!',
|
||||
'draft' => 'This is a <b>DRAFT</b> invoice and will be reflected to charts once it gets sent.',
|
||||
'draft' => 'This is a <b>DRAFT</b> invoice and will be reflected to charts after it gets sent.',
|
||||
|
||||
'status' => [
|
||||
'created' => 'Created on :date',
|
||||
|
Loading…
x
Reference in New Issue
Block a user