mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-05 00:34:35 -04:00
Fixes for random data seeder
This commit is contained in:
parent
d32a767495
commit
7e56f69610
@ -16,13 +16,14 @@ use App\Models\Company;
|
|||||||
use Illuminate\Broadcasting\Channel;
|
use Illuminate\Broadcasting\Channel;
|
||||||
use Illuminate\Broadcasting\InteractsWithSockets;
|
use Illuminate\Broadcasting\InteractsWithSockets;
|
||||||
use Illuminate\Broadcasting\PrivateChannel;
|
use Illuminate\Broadcasting\PrivateChannel;
|
||||||
|
use Illuminate\Contracts\Broadcasting\ShouldBroadcast;
|
||||||
use Illuminate\Foundation\Events\Dispatchable;
|
use Illuminate\Foundation\Events\Dispatchable;
|
||||||
use Illuminate\Queue\SerializesModels;
|
use Illuminate\Queue\SerializesModels;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class ClientWasArchived.
|
* Class ClientWasArchived.
|
||||||
*/
|
*/
|
||||||
class ClientWasArchived
|
class ClientWasArchived implements ShouldBroadcast
|
||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithSockets, SerializesModels;
|
use Dispatchable, InteractsWithSockets, SerializesModels;
|
||||||
|
|
||||||
@ -55,7 +56,7 @@ class ClientWasArchived
|
|||||||
* @return Channel|array
|
* @return Channel|array
|
||||||
*/
|
*/
|
||||||
public function broadcastOn()
|
public function broadcastOn()
|
||||||
{
|
{nlog("broadcasting");
|
||||||
return new PrivateChannel('channel-name');
|
return new PrivateChannel('channel-name');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,8 +38,13 @@ class PrePaymentController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
$data['minimum_amount'] = auth()->guard('contact')->user()->client->getSetting('client_initiated_payments_minimum');
|
|
||||||
$data['title'] = ctrans('texts.amount'). " " .auth()->guard('contact')->user()->client->currency()->code." (".auth()->guard('contact')->user()->client->currency()->symbol . ")";
|
$data = [
|
||||||
|
'title' => ctrans('texts.amount'). " " .auth()->guard('contact')->user()->client->currency()->code." (".auth()->guard('contact')->user()->client->currency()->symbol . ")",
|
||||||
|
'allows_recurring' => auth()->guard('contact')->user()->client->getSetting('client_initiated_payments_recurring'),
|
||||||
|
'allows_recurring' => true,
|
||||||
|
'minimum_amount' => auth()->guard('contact')->user()->client->getSetting('client_initiated_payments_minimum'),
|
||||||
|
];
|
||||||
|
|
||||||
return $this->render('pre_payments.index', $data);
|
return $this->render('pre_payments.index', $data);
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,7 @@ class SubdomainController extends BaseController
|
|||||||
'beta',
|
'beta',
|
||||||
'prometh',
|
'prometh',
|
||||||
'license',
|
'license',
|
||||||
|
'socket',
|
||||||
];
|
];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
"omnipay/paypal": "^3.0",
|
"omnipay/paypal": "^3.0",
|
||||||
"payfast/payfast-php-sdk": "^1.1",
|
"payfast/payfast-php-sdk": "^1.1",
|
||||||
"pragmarx/google2fa": "^8.0",
|
"pragmarx/google2fa": "^8.0",
|
||||||
"turbo124/predis": "1.1.11",
|
"pusher/pusher-php-server": "^7.2",
|
||||||
"razorpay/razorpay": "2.*",
|
"razorpay/razorpay": "2.*",
|
||||||
"sentry/sentry-laravel": "^3",
|
"sentry/sentry-laravel": "^3",
|
||||||
"setasign/fpdf": "^1.8",
|
"setasign/fpdf": "^1.8",
|
||||||
@ -88,6 +88,7 @@
|
|||||||
"symfony/mailgun-mailer": "^6.1",
|
"symfony/mailgun-mailer": "^6.1",
|
||||||
"symfony/postmark-mailer": "^6.1",
|
"symfony/postmark-mailer": "^6.1",
|
||||||
"turbo124/beacon": "^1.4",
|
"turbo124/beacon": "^1.4",
|
||||||
|
"turbo124/predis": "1.1.11",
|
||||||
"twilio/sdk": "^6.40",
|
"twilio/sdk": "^6.40",
|
||||||
"webpatser/laravel-countries": "dev-master#75992ad",
|
"webpatser/laravel-countries": "dev-master#75992ad",
|
||||||
"wepay/php-sdk": "^0.3"
|
"wepay/php-sdk": "^0.3"
|
||||||
|
149
composer.lock
generated
149
composer.lock
generated
@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "5aa22a61531e67324395d207a7c94e27",
|
"content-hash": "9f936d7b92dfacb4e28eda9197563c32",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "afosto/yaac",
|
"name": "afosto/yaac",
|
||||||
@ -6369,6 +6369,92 @@
|
|||||||
},
|
},
|
||||||
"time": "2020-10-15T08:29:30+00:00"
|
"time": "2020-10-15T08:29:30+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "paragonie/sodium_compat",
|
||||||
|
"version": "v1.19.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/paragonie/sodium_compat.git",
|
||||||
|
"reference": "cb15e403ecbe6a6cc515f855c310eb6b1872a933"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/paragonie/sodium_compat/zipball/cb15e403ecbe6a6cc515f855c310eb6b1872a933",
|
||||||
|
"reference": "cb15e403ecbe6a6cc515f855c310eb6b1872a933",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"paragonie/random_compat": ">=1",
|
||||||
|
"php": "^5.2.4|^5.3|^5.4|^5.5|^5.6|^7|^8"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^3|^4|^5|^6|^7|^8|^9"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-libsodium": "PHP < 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security.",
|
||||||
|
"ext-sodium": "PHP >= 7.0: Better performance, password hashing (Argon2i), secure memory management (memzero), and better security."
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"autoload.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"ISC"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Paragon Initiative Enterprises",
|
||||||
|
"email": "security@paragonie.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Frank Denis",
|
||||||
|
"email": "jedisct1@pureftpd.org"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Pure PHP implementation of libsodium; uses the PHP extension if it exists",
|
||||||
|
"keywords": [
|
||||||
|
"Authentication",
|
||||||
|
"BLAKE2b",
|
||||||
|
"ChaCha20",
|
||||||
|
"ChaCha20-Poly1305",
|
||||||
|
"Chapoly",
|
||||||
|
"Curve25519",
|
||||||
|
"Ed25519",
|
||||||
|
"EdDSA",
|
||||||
|
"Edwards-curve Digital Signature Algorithm",
|
||||||
|
"Elliptic Curve Diffie-Hellman",
|
||||||
|
"Poly1305",
|
||||||
|
"Pure-PHP cryptography",
|
||||||
|
"RFC 7748",
|
||||||
|
"RFC 8032",
|
||||||
|
"Salpoly",
|
||||||
|
"Salsa20",
|
||||||
|
"X25519",
|
||||||
|
"XChaCha20-Poly1305",
|
||||||
|
"XSalsa20-Poly1305",
|
||||||
|
"Xchacha20",
|
||||||
|
"Xsalsa20",
|
||||||
|
"aead",
|
||||||
|
"cryptography",
|
||||||
|
"ecdh",
|
||||||
|
"elliptic curve",
|
||||||
|
"elliptic curve cryptography",
|
||||||
|
"encryption",
|
||||||
|
"libsodium",
|
||||||
|
"php",
|
||||||
|
"public-key cryptography",
|
||||||
|
"secret-key cryptography",
|
||||||
|
"side-channel resistant"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/paragonie/sodium_compat/issues",
|
||||||
|
"source": "https://github.com/paragonie/sodium_compat/tree/v1.19.0"
|
||||||
|
},
|
||||||
|
"time": "2022-09-26T03:40:35+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "payfast/payfast-php-sdk",
|
"name": "payfast/payfast-php-sdk",
|
||||||
"version": "v1.1.4",
|
"version": "v1.1.4",
|
||||||
@ -7645,6 +7731,67 @@
|
|||||||
},
|
},
|
||||||
"time": "2023-01-29T21:24:40+00:00"
|
"time": "2023-01-29T21:24:40+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "pusher/pusher-php-server",
|
||||||
|
"version": "7.2.2",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/pusher/pusher-http-php.git",
|
||||||
|
"reference": "4ace4873873b06c25cecb2dd6d9fdcbf2f20b640"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/pusher/pusher-http-php/zipball/4ace4873873b06c25cecb2dd6d9fdcbf2f20b640",
|
||||||
|
"reference": "4ace4873873b06c25cecb2dd6d9fdcbf2f20b640",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"ext-curl": "*",
|
||||||
|
"ext-json": "*",
|
||||||
|
"guzzlehttp/guzzle": "^7.2",
|
||||||
|
"paragonie/sodium_compat": "^1.6",
|
||||||
|
"php": "^7.3|^8.0",
|
||||||
|
"psr/log": "^1.0|^2.0|^3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"overtrue/phplint": "^2.3",
|
||||||
|
"phpunit/phpunit": "^9.3"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "5.0-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Pusher\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"description": "Library for interacting with the Pusher REST API",
|
||||||
|
"keywords": [
|
||||||
|
"events",
|
||||||
|
"messaging",
|
||||||
|
"php-pusher-server",
|
||||||
|
"publish",
|
||||||
|
"push",
|
||||||
|
"pusher",
|
||||||
|
"real time",
|
||||||
|
"real-time",
|
||||||
|
"realtime",
|
||||||
|
"rest",
|
||||||
|
"trigger"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/pusher/pusher-http-php/issues",
|
||||||
|
"source": "https://github.com/pusher/pusher-http-php/tree/7.2.2"
|
||||||
|
},
|
||||||
|
"time": "2022-12-20T19:52:36+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "ralouphie/getallheaders",
|
"name": "ralouphie/getallheaders",
|
||||||
"version": "3.0.3",
|
"version": "3.0.3",
|
||||||
|
@ -110,6 +110,7 @@ class RandomDataSeeder extends Seeder
|
|||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'name' => 'test token',
|
'name' => 'test token',
|
||||||
'token' => \Illuminate\Support\Str::random(64),
|
'token' => \Illuminate\Support\Str::random(64),
|
||||||
|
'is_system' => 1
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user->companies()->attach($company->id, [
|
$user->companies()->attach($company->id, [
|
||||||
@ -157,6 +158,7 @@ class RandomDataSeeder extends Seeder
|
|||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'name' => 'test token',
|
'name' => 'test token',
|
||||||
'token' => \Illuminate\Support\Str::random(64),
|
'token' => \Illuminate\Support\Str::random(64),
|
||||||
|
'is_system' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
$user->companies()->attach($company->id, [
|
$user->companies()->attach($company->id, [
|
||||||
@ -200,6 +202,7 @@ class RandomDataSeeder extends Seeder
|
|||||||
'account_id' => $account->id,
|
'account_id' => $account->id,
|
||||||
'name' => 'test token',
|
'name' => 'test token',
|
||||||
'token' => \Illuminate\Support\Str::random(64),
|
'token' => \Illuminate\Support\Str::random(64),
|
||||||
|
'is_system' => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
@ -5021,6 +5021,7 @@ $LANG = array(
|
|||||||
'payment_type_Klarna' => 'Klarna',
|
'payment_type_Klarna' => 'Klarna',
|
||||||
'payment_type_Interac E Transfer' => 'Interac E Transfer',
|
'payment_type_Interac E Transfer' => 'Interac E Transfer',
|
||||||
'pre_payment' => 'Pre Payment',
|
'pre_payment' => 'Pre Payment',
|
||||||
|
'client_remaining_cycles_helper' => 'The number of times this invoice will be generated',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
@extends('portal.ninja2020.layout.app')
|
@extends('portal.ninja2020.layout.app')
|
||||||
@section('meta_title', ctrans('texts.pre_payment'))
|
@section('meta_title', ctrans('texts.pre_payment'))
|
||||||
|
|
||||||
|
@push('head')
|
||||||
|
<style>
|
||||||
|
[x-cloak] { display: none; }
|
||||||
|
</style>
|
||||||
|
@endpush
|
||||||
@section('body')
|
@section('body')
|
||||||
<form action="{{ route('client.pre_payments.process') }}" method="post" id="payment-form" onkeypress="return event.keyCode != 13;">
|
<form action="{{ route('client.pre_payments.process') }}" method="post" id="payment-form" onkeypress="return event.keyCode != 13;">
|
||||||
@csrf
|
@csrf
|
||||||
@ -12,10 +17,8 @@
|
|||||||
<div class="grid grid-cols-6 gap-4">
|
<div class="grid grid-cols-6 gap-4">
|
||||||
<div class="col-span-6 md:col-start-2 md:col-span-4">
|
<div class="col-span-6 md:col-start-2 md:col-span-4">
|
||||||
<div class="flex justify-end">
|
<div class="flex justify-end">
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="mb-4 overflow-hidden bg-white shadow sm:rounded-lg">
|
<div class="mb-4 overflow-hidden bg-white shadow sm:rounded-lg">
|
||||||
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
|
<div class="px-4 py-5 border-b border-gray-200 sm:px-6">
|
||||||
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
<h3 class="text-lg font-medium leading-6 text-gray-900">
|
||||||
@ -46,6 +49,46 @@
|
|||||||
|
|
||||||
@endcomponent
|
@endcomponent
|
||||||
|
|
||||||
|
@if($allows_recurring)
|
||||||
|
<div x-data="{ show: false }">
|
||||||
|
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.enable_recurring')])
|
||||||
|
<input x-on:click="show = !show" id="is_recurring" aria-describedby="recurring-description" name="is_recurring" type="checkbox" class="h-4 w-4 rounded border-gray-300 text-indigo-600 focus:ring-indigo-600">
|
||||||
|
@endcomponent
|
||||||
|
|
||||||
|
<div x-cloak x-show="show">
|
||||||
|
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.cycles_remaining')])
|
||||||
|
<select name="remaining_cycles" class="form-select input w-full bg-white">
|
||||||
|
<option value="-1" selected>{{ ctrans('texts.freq_indefinitely')}}</option>
|
||||||
|
@for($i = 1; $i < 60; $i++)
|
||||||
|
<option value={{$i}}>{{$i}}</option>
|
||||||
|
@endfor
|
||||||
|
</select>
|
||||||
|
<span class="py-2">
|
||||||
|
<label for="remaining_cycles" class="col-form-label text-center col-lg-3 text-gray-900">{{ ctrans ('texts.client_remaining_cycles_helper')}}</label>
|
||||||
|
</span>
|
||||||
|
@endcomponent
|
||||||
|
@component('portal.ninja2020.components.general.card-element', ['title' => ctrans('texts.frequency')])
|
||||||
|
<select name="frequency_id" class="form-select input w-full bg-white">
|
||||||
|
<option value="1">{{ ctrans('texts.freq_daily') }}</option>
|
||||||
|
<option value="2">{{ ctrans('texts.freq_weekly') }}</option>
|
||||||
|
<option value="3">{{ ctrans('texts.freq_two_weeks') }}</option>
|
||||||
|
<option value="4">{{ ctrans('texts.freq_four_weeks') }}</option>
|
||||||
|
<option value="5">{{ ctrans('texts.freq_monthly') }}</option>
|
||||||
|
<option value="6">{{ ctrans('texts.freq_two_months') }}</option>
|
||||||
|
<option value="7">{{ ctrans('texts.freq_three_months') }}</option>
|
||||||
|
<option value="8">{{ ctrans('texts.') }}</option>
|
||||||
|
<option value="9">{{ ctrans('texts.') }}</option>
|
||||||
|
<option value="10">{{ ctrans('texts.') }}</option>
|
||||||
|
<option value="11">{{ ctrans('texts.') }}</option>
|
||||||
|
<option value="12">{{ ctrans('texts.') }}</option>
|
||||||
|
</select>
|
||||||
|
@endcomponent
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="px-4 py-3 bg-gray-50 text-right sm:px-6" x-data="{ buttonDisabled: false }">
|
<div class="px-4 py-3 bg-gray-50 text-right sm:px-6" x-data="{ buttonDisabled: false }">
|
||||||
<button class="button button-primary bg-primary"x-on:click="buttonDisabled = true" x-bind:disabled="buttonDisabled">{{ ctrans('texts.pay_now') }}</button>
|
<button class="button button-primary bg-primary"x-on:click="buttonDisabled = true" x-bind:disabled="buttonDisabled">{{ ctrans('texts.pay_now') }}</button>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user