mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 17:44:29 -04:00
Merge pull request #8311 from turbo124/v5-develop
Update randomdataseeder
This commit is contained in:
commit
c9b7dd79d7
@ -148,7 +148,7 @@ class HtmlEngine
|
||||
$data['$payment_button'] = ['value' => $this->buildViewButton($this->invitation->getPaymentLink(), ctrans('texts.pay_now')), 'label' => ctrans('texts.pay_now')];
|
||||
$data['$payment_link'] = ['value' => $this->invitation->getPaymentLink(), 'label' => ctrans('texts.pay_now')];
|
||||
$data['$payment_qrcode'] = ['value' => $this->invitation->getPaymentQrCode(), 'label' => ctrans('texts.pay_now')];
|
||||
|
||||
$data['$exchange_rate'] = ['value' => $this->entity->exchange_rate ?: ' ', 'label' => ctrans('texts.exchange_rate')];
|
||||
|
||||
if ($this->entity_string == 'invoice' || $this->entity_string == 'recurring_invoice') {
|
||||
$data['$entity'] = ['value' => '', 'label' => ctrans('texts.invoice')];
|
||||
|
@ -117,6 +117,60 @@ class RandomDataSeeder extends Seeder
|
||||
'settings' => null,
|
||||
]);
|
||||
|
||||
$user = User::firstOrNew([
|
||||
'email' => 'user@example.com',
|
||||
]);
|
||||
|
||||
$user->password = Hash::make('password');
|
||||
$user->email_verified_at = now();
|
||||
$user->save();
|
||||
|
||||
$user->companies()->attach($company->id, [
|
||||
'account_id' => $account->id,
|
||||
'is_owner' => 1,
|
||||
'is_admin' => 1,
|
||||
'is_locked' => 0,
|
||||
'notifications' => CompanySettings::notificationDefaults(),
|
||||
'permissions' => '',
|
||||
'settings' => null,
|
||||
]);
|
||||
|
||||
$company_token = CompanyToken::create([
|
||||
'user_id' => $user->id,
|
||||
'company_id' => $company->id,
|
||||
'account_id' => $account->id,
|
||||
'name' => 'test token',
|
||||
'token' => \Illuminate\Support\Str::random(64),
|
||||
]);
|
||||
|
||||
|
||||
$user = User::firstOrNew([
|
||||
'email' => 'permissions@example.com',
|
||||
]);
|
||||
|
||||
$user->password = Hash::make('password');
|
||||
$user->email_verified_at = now();
|
||||
$user->save();
|
||||
|
||||
$company_token = CompanyToken::create([
|
||||
'user_id' => $user->id,
|
||||
'company_id' => $company->id,
|
||||
'account_id' => $account->id,
|
||||
'name' => 'test token',
|
||||
'token' => \Illuminate\Support\Str::random(64),
|
||||
]);
|
||||
|
||||
$user->companies()->attach($company->id, [
|
||||
'account_id' => $account->id,
|
||||
'is_owner' => 0,
|
||||
'is_admin' => 0,
|
||||
'is_locked' => 0,
|
||||
'notifications' => CompanySettings::notificationDefaults(),
|
||||
'permissions' => '',
|
||||
'settings' => null,
|
||||
]);
|
||||
|
||||
|
||||
$client = Client::factory()->create([
|
||||
'user_id' => $user->id,
|
||||
'company_id' => $company->id,
|
||||
|
Loading…
x
Reference in New Issue
Block a user