mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Merge pull request #3954 from turbo124/v2
Ensure group settings can be archived + tests!
This commit is contained in:
commit
6ca8bb95bd
@ -332,7 +332,7 @@ class CreateTestData extends Command
|
|||||||
$this->info('Creating '.$this->count. ' clients');
|
$this->info('Creating '.$this->count. ' clients');
|
||||||
|
|
||||||
|
|
||||||
for ($x=0; $x<$this->count*1000; $x++) {
|
for ($x=0; $x<$this->count*500; $x++) {
|
||||||
$z = $x+1;
|
$z = $x+1;
|
||||||
$this->info("Creating client # ".$z);
|
$this->info("Creating client # ".$z);
|
||||||
|
|
||||||
|
@ -25,7 +25,6 @@ class CompanySettings extends BaseSettings
|
|||||||
|
|
||||||
/*Invoice*/
|
/*Invoice*/
|
||||||
public $auto_archive_invoice = false;
|
public $auto_archive_invoice = false;
|
||||||
public $lock_sent_invoices = false;
|
|
||||||
|
|
||||||
public $lock_invoices = 'off'; //off,when_sent,when_paid
|
public $lock_invoices = 'off'; //off,when_sent,when_paid
|
||||||
|
|
||||||
@ -391,7 +390,6 @@ class CompanySettings extends BaseSettings
|
|||||||
'show_currency_code' => 'bool',
|
'show_currency_code' => 'bool',
|
||||||
'send_reminders' => 'bool',
|
'send_reminders' => 'bool',
|
||||||
'enable_client_portal_tasks' => 'bool',
|
'enable_client_portal_tasks' => 'bool',
|
||||||
'lock_sent_invoices' => 'bool',
|
|
||||||
'auto_archive_invoice' => 'bool',
|
'auto_archive_invoice' => 'bool',
|
||||||
'auto_archive_quote' => 'bool',
|
'auto_archive_quote' => 'bool',
|
||||||
'auto_convert_quote' => 'bool',
|
'auto_convert_quote' => 'bool',
|
||||||
|
@ -121,7 +121,6 @@ class EmailTemplateDefaults
|
|||||||
|
|
||||||
return $converter->convertToHtml(self::transformText('invoice_message'));
|
return $converter->convertToHtml(self::transformText('invoice_message'));
|
||||||
|
|
||||||
//return Parsedown::instance()->line(self::transformText('invoice_message'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function emailQuoteSubject()
|
public static function emailQuoteSubject()
|
||||||
|
@ -70,9 +70,9 @@ class InvoiceFilters extends QueryFilters
|
|||||||
return $this->builder;
|
return $this->builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function invoice_number(string $invoice_number):Builder
|
public function number(string $number) :Builder
|
||||||
{
|
{
|
||||||
return $this->builder->where('number', $invoice_number);
|
return $this->builder->where('number', $number);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -72,7 +72,7 @@ class AccountController extends BaseController
|
|||||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
* @OA\Parameter(
|
* @OA\Parameter(
|
||||||
* name="token_name",
|
* name="token_name",
|
||||||
* in="path",
|
* in="query",
|
||||||
* description="A custom name for the user company token",
|
* description="A custom name for the user company token",
|
||||||
* example="Daves iOS Device",
|
* example="Daves iOS Device",
|
||||||
* required=true,
|
* required=true,
|
||||||
|
@ -186,6 +186,10 @@ class BaseController extends Controller
|
|||||||
|
|
||||||
$transformer = new $this->entity_transformer($this->serializer);
|
$transformer = new $this->entity_transformer($this->serializer);
|
||||||
$updated_at = request()->has('updated_at') ? request()->input('updated_at') : 0;
|
$updated_at = request()->has('updated_at') ? request()->input('updated_at') : 0;
|
||||||
|
|
||||||
|
if(auth()->user()->getCompany()->is_large && !request()->has('updated_at'))
|
||||||
|
return response()->json(['message' => 'Cannot load a large account without a updated_at parameter','errors' =>[]],401);
|
||||||
|
|
||||||
$updated_at = date('Y-m-d H:i:s', $updated_at);
|
$updated_at = date('Y-m-d H:i:s', $updated_at);
|
||||||
|
|
||||||
$query->with(
|
$query->with(
|
||||||
@ -202,8 +206,8 @@ class BaseController extends Controller
|
|||||||
'company.groups' => function ($query) use($updated_at){
|
'company.groups' => function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at);
|
$query->where('updated_at', '>=', $updated_at);
|
||||||
},
|
},
|
||||||
'company.company_gateways' => function ($query) use($updated_at){
|
'company.company_gateways' => function ($query){
|
||||||
$query->where('updated_at', '>=', $updated_at)->with('gateway');
|
$query->whereNotNull('updated_at');
|
||||||
},
|
},
|
||||||
'company.products' => function ($query) use($updated_at){
|
'company.products' => function ($query) use($updated_at){
|
||||||
$query->where('updated_at', '>=', $updated_at);
|
$query->where('updated_at', '>=', $updated_at);
|
||||||
|
@ -87,17 +87,6 @@ class CompanyUserController extends BaseController
|
|||||||
* description="Attempts to update a company user record. A company user can modify only their settings fields. Full access for Admin users",
|
* description="Attempts to update a company user record. A company user can modify only their settings fields. Full access for Admin users",
|
||||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
* @OA\Parameter(
|
|
||||||
* name="id",
|
|
||||||
* in="path",
|
|
||||||
* description="The Invoice Hashed ID",
|
|
||||||
* example="D2J234DFA",
|
|
||||||
* required=true,
|
|
||||||
* @OA\Schema(
|
|
||||||
* type="string",
|
|
||||||
* format="string",
|
|
||||||
* ),
|
|
||||||
* ),
|
|
||||||
* @OA\Response(
|
* @OA\Response(
|
||||||
* response=200,
|
* response=200,
|
||||||
* description="The Company User response",
|
* description="The Company User response",
|
||||||
|
@ -21,6 +21,7 @@ use App\Http\Requests\GroupSetting\UpdateGroupSettingRequest;
|
|||||||
use App\Models\GroupSetting;
|
use App\Models\GroupSetting;
|
||||||
use App\Repositories\GroupSettingRepository;
|
use App\Repositories\GroupSettingRepository;
|
||||||
use App\Transformers\GroupSettingTransformer;
|
use App\Transformers\GroupSettingTransformer;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
use App\Utils\Traits\Uploadable;
|
use App\Utils\Traits\Uploadable;
|
||||||
use Illuminate\Foundation\Bus\DispatchesJobs;
|
use Illuminate\Foundation\Bus\DispatchesJobs;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
@ -29,6 +30,7 @@ class GroupSettingController extends BaseController
|
|||||||
{
|
{
|
||||||
use DispatchesJobs;
|
use DispatchesJobs;
|
||||||
use Uploadable;
|
use Uploadable;
|
||||||
|
use MakesHash;
|
||||||
|
|
||||||
protected $entity_type = GroupSetting::class;
|
protected $entity_type = GroupSetting::class;
|
||||||
|
|
||||||
|
@ -392,6 +392,9 @@ class InvoiceController extends BaseController
|
|||||||
return $request->disallowUpdate();
|
return $request->disallowUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($invoice->isLocked())
|
||||||
|
return response()->json(['message' => 'Invoice is locked, no modifications allowed']);
|
||||||
|
|
||||||
$invoice = $this->invoice_repo->save($request->all(), $invoice);
|
$invoice = $this->invoice_repo->save($request->all(), $invoice);
|
||||||
|
|
||||||
event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars()));
|
event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars()));
|
||||||
|
@ -39,7 +39,7 @@ class LicenseController extends BaseController
|
|||||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
* @OA\Parameter(
|
* @OA\Parameter(
|
||||||
* name="license_key",
|
* name="license_key",
|
||||||
* in="path",
|
* in="query",
|
||||||
* description="The license hash",
|
* description="The license hash",
|
||||||
* example="d87sh-s755s-s7d76-sdsd8",
|
* example="d87sh-s755s-s7d76-sdsd8",
|
||||||
* required=true,
|
* required=true,
|
||||||
@ -50,7 +50,7 @@ class LicenseController extends BaseController
|
|||||||
* ),
|
* ),
|
||||||
* @OA\Parameter(
|
* @OA\Parameter(
|
||||||
* name="product_id",
|
* name="product_id",
|
||||||
* in="path",
|
* in="query",
|
||||||
* description="The ID of the product purchased.",
|
* description="The ID of the product purchased.",
|
||||||
* example="1",
|
* example="1",
|
||||||
* required=true,
|
* required=true,
|
||||||
|
@ -162,7 +162,7 @@ class MigrationController extends BaseController
|
|||||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Password"),
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Password"),
|
||||||
* @OA\Parameter(
|
* @OA\Parameter(
|
||||||
* name="migration",
|
* name="migration",
|
||||||
* in="path",
|
* in="query",
|
||||||
* description="The migraton file",
|
* description="The migraton file",
|
||||||
* example="migration.zip",
|
* example="migration.zip",
|
||||||
* required=true,
|
* required=true,
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
* @OA\Property(property="custom_message_unpaid_invoice", type="string", example="Please pay invoices immediately", description="____________"),
|
* @OA\Property(property="custom_message_unpaid_invoice", type="string", example="Please pay invoices immediately", description="____________"),
|
||||||
* @OA\Property(property="custom_message_paid_invoice", type="string", example="Thanks for paying this invoice!", description="____________"),
|
* @OA\Property(property="custom_message_paid_invoice", type="string", example="Thanks for paying this invoice!", description="____________"),
|
||||||
* @OA\Property(property="custom_message_unapproved_quote", type="string", example="Please approve quote", description="____________"),
|
* @OA\Property(property="custom_message_unapproved_quote", type="string", example="Please approve quote", description="____________"),
|
||||||
* @OA\Property(property="lock_sent_invoices", type="boolean", example=true, description="____________"),
|
* @OA\Property(property="lock_invoices", type="boolean", example=true, description="____________"),
|
||||||
* @OA\Property(property="auto_archive_invoice", type="boolean", example=true, description="____________"),
|
* @OA\Property(property="auto_archive_invoice", type="boolean", example=true, description="____________"),
|
||||||
* @OA\Property(property="auto_archive_quote", type="boolean", example=true, description="____________"),
|
* @OA\Property(property="auto_archive_quote", type="boolean", example=true, description="____________"),
|
||||||
* @OA\Property(property="auto_convert_quote", type="boolean", example=true, description="____________"),
|
* @OA\Property(property="auto_convert_quote", type="boolean", example=true, description="____________"),
|
||||||
|
@ -85,7 +85,7 @@
|
|||||||
* ),
|
* ),
|
||||||
*
|
*
|
||||||
* @OA\Parameter(
|
* @OA\Parameter(
|
||||||
* name="",
|
* name="api_version",
|
||||||
* in="query",
|
* in="query",
|
||||||
* description="The API version",
|
* description="The API version",
|
||||||
* @OA\Schema(
|
* @OA\Schema(
|
||||||
|
@ -11,15 +11,34 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Utils\Ninja;
|
||||||
|
use App\Utils\SystemHealth;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
class PingController extends BaseController
|
class PingController extends BaseController
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display a listing of the resource.
|
* Get a ping response from the system.
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\Response
|
* @return \Illuminate\Http\Response
|
||||||
|
*
|
||||||
|
* @OA\Get(
|
||||||
|
* path="/api/v1/ping",
|
||||||
|
* operationId="getPing",
|
||||||
|
* tags={"ping"},
|
||||||
|
* summary="Attempts to ping the API",
|
||||||
|
* description="Attempts to ping the API",
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
|
* @OA\Response(
|
||||||
|
* response=200,
|
||||||
|
* description="The company and user name",
|
||||||
|
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||||
|
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
|
||||||
|
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
|
||||||
|
* )
|
||||||
|
* )
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
@ -28,4 +47,34 @@ class PingController extends BaseController
|
|||||||
'user_name' => auth()->user()->present()->name(),
|
'user_name' => auth()->user()->present()->name(),
|
||||||
], 200);
|
], 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a health check of the system
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\Response
|
||||||
|
*
|
||||||
|
* @OA\Get(
|
||||||
|
* path="/api/v1/health_check",
|
||||||
|
* operationId="getHealthCheck",
|
||||||
|
* tags={"health_check"},
|
||||||
|
* summary="Attempts to get a health check from the API",
|
||||||
|
* description="Attempts to get a health check from the API",
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
|
* @OA\Response(
|
||||||
|
* response=200,
|
||||||
|
* description="A key/value map of the system health",
|
||||||
|
* @OA\Header(header="X-MINIMUM-CLIENT-VERSION", ref="#/components/headers/X-MINIMUM-CLIENT-VERSION"),
|
||||||
|
* @OA\Header(header="X-RateLimit-Remaining", ref="#/components/headers/X-RateLimit-Remaining"),
|
||||||
|
* @OA\Header(header="X-RateLimit-Limit", ref="#/components/headers/X-RateLimit-Limit"),
|
||||||
|
* )
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
public function health()
|
||||||
|
{
|
||||||
|
if(Ninja::isNinja())
|
||||||
|
return response()->json(['message' => 'Route not available', 'errors'=>[]], 403);
|
||||||
|
|
||||||
|
return response()->json(SystemHealth::check(),200);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -45,28 +45,6 @@ class PreviewController extends BaseController
|
|||||||
* description="Returns a pdf preview.",
|
* description="Returns a pdf preview.",
|
||||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
* @OA\Parameter(
|
|
||||||
* name="entity",
|
|
||||||
* in="path",
|
|
||||||
* description="The PDF",
|
|
||||||
* example="invoice",
|
|
||||||
* required=true,
|
|
||||||
* @OA\Schema(
|
|
||||||
* type="string",
|
|
||||||
* format="string",
|
|
||||||
* ),
|
|
||||||
* ),
|
|
||||||
* @OA\Parameter(
|
|
||||||
* name="entity_id",
|
|
||||||
* in="path",
|
|
||||||
* description="The Entity ID",
|
|
||||||
* example="X9f87dkf",
|
|
||||||
* required=true,
|
|
||||||
* @OA\Schema(
|
|
||||||
* type="string",
|
|
||||||
* format="string",
|
|
||||||
* ),
|
|
||||||
* ),
|
|
||||||
* @OA\Response(
|
* @OA\Response(
|
||||||
* response=200,
|
* response=200,
|
||||||
* description="The pdf response",
|
* description="The pdf response",
|
||||||
|
@ -42,28 +42,6 @@ class TemplateController extends BaseController
|
|||||||
* description="Returns a entity template with the template variables replaced with the Entities",
|
* description="Returns a entity template with the template variables replaced with the Entities",
|
||||||
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||||
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
* @OA\Parameter(
|
|
||||||
* name="entity",
|
|
||||||
* in="path",
|
|
||||||
* description="The Entity (invoice,quote,recurring_invoice)",
|
|
||||||
* example="invoice",
|
|
||||||
* required=true,
|
|
||||||
* @OA\Schema(
|
|
||||||
* type="string",
|
|
||||||
* format="string",
|
|
||||||
* ),
|
|
||||||
* ),
|
|
||||||
* @OA\Parameter(
|
|
||||||
* name="entity_id",
|
|
||||||
* in="path",
|
|
||||||
* description="The Entity ID",
|
|
||||||
* example="X9f87dkf",
|
|
||||||
* required=true,
|
|
||||||
* @OA\Schema(
|
|
||||||
* type="string",
|
|
||||||
* format="string",
|
|
||||||
* ),
|
|
||||||
* ),
|
|
||||||
* @OA\RequestBody(
|
* @OA\RequestBody(
|
||||||
* description="The template subject and body",
|
* description="The template subject and body",
|
||||||
* required=true,
|
* required=true,
|
||||||
|
@ -94,4 +94,11 @@ class UpdateInvoiceRequest extends Request
|
|||||||
|
|
||||||
$this->replace($input);
|
$this->replace($input);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function messages()
|
||||||
|
{
|
||||||
|
return [
|
||||||
|
'id' => ctrans('text.locked_invoice'),
|
||||||
|
];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ class BouncedEmail extends Mailable implements ShouldQueue
|
|||||||
//->bcc('')
|
//->bcc('')
|
||||||
->queue(new BouncedEmail($invitation));
|
->queue(new BouncedEmail($invitation));
|
||||||
|
|
||||||
return $this->from('turbo124@gmail.com') //todo
|
return $this->from('x@gmail.com') //todo
|
||||||
->subject(ctrans('texts.confirmation_subject'))
|
->subject(ctrans('texts.confirmation_subject'))
|
||||||
->markdown('email.auth.verify', ['user' => $this->user])
|
->markdown('email.auth.verify', ['user' => $this->user])
|
||||||
->text('email.auth.verify_text');
|
->text('email.auth.verify_text');
|
||||||
|
@ -39,7 +39,7 @@ class VerifyUser extends Mailable implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
public function build()
|
public function build()
|
||||||
{
|
{
|
||||||
return $this->from('turbo124@gmail.com') //todo
|
return $this->from('x@gmail.com') //todo
|
||||||
->subject(ctrans('texts.confirmation_subject'))
|
->subject(ctrans('texts.confirmation_subject'))
|
||||||
->markdown('email.auth.verify', ['user' => $this->user])
|
->markdown('email.auth.verify', ['user' => $this->user])
|
||||||
->text('email.auth.verify_text');
|
->text('email.auth.verify_text');
|
||||||
|
@ -460,10 +460,10 @@ class Client extends BaseModel implements HasLocalePreference
|
|||||||
else
|
else
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
if ((property_exists($fees_and_limits, 'min_limit')) && $fees_and_limits->min_limit !== null && $amount < $fees_and_limits->min_limit)
|
if ((property_exists($fees_and_limits, 'min_limit')) && $fees_and_limits->min_limit !== null && $fees_and_limits->min_limit != -1 && $amount < $fees_and_limits->min_limit)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if ((property_exists($fees_and_limits, 'max_limit')) && $fees_and_limits->max_limit !== null && $amount > $fees_and_limits->max_limit)
|
if ((property_exists($fees_and_limits, 'max_limit')) && $fees_and_limits->max_limit !== null && $fees_and_limits->max_limit != -1 && $amount > $fees_and_limits->max_limit)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -109,6 +109,7 @@ class Company extends BaseModel
|
|||||||
'slack_webhook_url',
|
'slack_webhook_url',
|
||||||
'google_analytics_key',
|
'google_analytics_key',
|
||||||
'client_can_register',
|
'client_can_register',
|
||||||
|
'enable_shop_api',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
|
@ -266,17 +266,6 @@ class Invoice extends BaseModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* If True, prevents an invoice from being
|
|
||||||
* modified once it has been marked as sent
|
|
||||||
*
|
|
||||||
* @return boolean isLocked
|
|
||||||
*/
|
|
||||||
public function isLocked(): bool
|
|
||||||
{
|
|
||||||
return $this->client->getSetting('lock_sent_invoices');
|
|
||||||
}
|
|
||||||
|
|
||||||
public function isPayable(): bool
|
public function isPayable(): bool
|
||||||
{
|
{
|
||||||
if($this->status_id == Invoice::STATUS_DRAFT && $this->is_deleted == false){
|
if($this->status_id == Invoice::STATUS_DRAFT && $this->is_deleted == false){
|
||||||
@ -437,6 +426,32 @@ class Invoice extends BaseModel
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filtering logic to determine
|
||||||
|
* whether an invoice is locked
|
||||||
|
* based on the current status of the invoice
|
||||||
|
* @return boolean [description]
|
||||||
|
*/
|
||||||
|
public function isLocked() :bool
|
||||||
|
{
|
||||||
|
$locked_status = $this->client->getSetting('lock_invoices');
|
||||||
|
|
||||||
|
switch ($locked_status) {
|
||||||
|
case 'off':
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case 'when_sent':
|
||||||
|
return $this->status_id == self::STATUS_DRAFT;
|
||||||
|
break;
|
||||||
|
case 'when_paid':
|
||||||
|
return $this->status_id == self::STATUS_PAID || $this->status_id == self::STATUS_PARTIAL;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Graveyard */
|
/* Graveyard */
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
|
@ -120,4 +120,22 @@ class BaseNotification extends Notification implements ShouldQueue
|
|||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getTemplateView()
|
||||||
|
{
|
||||||
|
|
||||||
|
switch ($this->settings->email_style) {
|
||||||
|
case 'plain':
|
||||||
|
return 'email.template.plain';
|
||||||
|
break;
|
||||||
|
case 'custom':
|
||||||
|
return 'email.template.custom';
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return 'email.admin.generic_email';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -73,14 +73,17 @@ class SendGenericNotification extends BaseNotification implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
public function toMail($notifiable)
|
public function toMail($notifiable)
|
||||||
{
|
{
|
||||||
|
|
||||||
$mail_message = (new MailMessage)
|
$mail_message = (new MailMessage)
|
||||||
->withSwiftMessage(function ($message) {
|
->withSwiftMessage(function ($message) {
|
||||||
$message->getHeaders()->addTextHeader('Tag', $this->invitation->company->company_key);
|
$message->getHeaders()->addTextHeader('Tag', $this->invitation->company->company_key);
|
||||||
})->markdown('email.admin.generic_email', $this->buildMailMessageData());
|
//})->markdown($this->getTemplateView(), $this->buildMailMessageData());
|
||||||
|
})->markdown('email.template.plain', $this->buildMailMessageData());
|
||||||
|
|
||||||
$mail_message = $this->buildMailMessageSettings($mail_message);
|
$mail_message = $this->buildMailMessageSettings($mail_message);
|
||||||
|
|
||||||
return $mail_message;
|
return $mail_message;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -70,6 +70,9 @@ class ClientContactRepository extends BaseRepository
|
|||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//need to reload here to shake off stale contacts
|
||||||
|
$client->load('contacts');
|
||||||
|
|
||||||
//always made sure we have one blank contact to maintain state
|
//always made sure we have one blank contact to maintain state
|
||||||
if ($client->contacts->count() == 0) {
|
if ($client->contacts->count() == 0) {
|
||||||
|
|
||||||
|
@ -56,6 +56,7 @@ class MarkPaid extends AbstractService
|
|||||||
$payment->client_id = $this->invoice->client_id;
|
$payment->client_id = $this->invoice->client_id;
|
||||||
$payment->transaction_reference = ctrans('texts.manual_entry');
|
$payment->transaction_reference = ctrans('texts.manual_entry');
|
||||||
$payment->currency_id = $this->invoice->client->getSetting('currency_id');
|
$payment->currency_id = $this->invoice->client->getSetting('currency_id');
|
||||||
|
$payment->is_manual = true;
|
||||||
/* Create a payment relationship to the invoice entity */
|
/* Create a payment relationship to the invoice entity */
|
||||||
$payment->save();
|
$payment->save();
|
||||||
|
|
||||||
|
@ -132,6 +132,7 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
'enabled_item_tax_rates' => (int) $company->enabled_item_tax_rates,
|
'enabled_item_tax_rates' => (int) $company->enabled_item_tax_rates,
|
||||||
'client_can_register' => (bool) $company->client_can_register,
|
'client_can_register' => (bool) $company->client_can_register,
|
||||||
'is_large' => (bool) $company->is_large,
|
'is_large' => (bool) $company->is_large,
|
||||||
|
'enable_shop_api' => (bool) $company->enable_shop_api,
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,22 +84,10 @@ class HtmlEngine
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
private function buildEntityDataArray() :array
|
public function buildEntityDataArray() :array
|
||||||
{
|
{
|
||||||
if (!$this->client->currency()) {
|
if (!$this->client->currency()) {
|
||||||
throw new \Exception(debug_backtrace()[1]['function'], 1);
|
throw new \Exception(debug_backtrace()[1]['function'], 1);
|
||||||
@ -132,6 +120,7 @@ class HtmlEngine
|
|||||||
$data['$number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.invoice_number')];
|
$data['$number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.invoice_number')];
|
||||||
$data['$entity.terms'] = ['value' => $this->entity->terms ?: ' ', 'label' => ctrans('texts.invoice_terms')];
|
$data['$entity.terms'] = ['value' => $this->entity->terms ?: ' ', 'label' => ctrans('texts.invoice_terms')];
|
||||||
$data['$terms'] = &$data['$entity.terms'];
|
$data['$terms'] = &$data['$entity.terms'];
|
||||||
|
$data['$view_link'] = ['value' => '<a href="' .$this->invitation->getLink() .'">'. ctrans('texts.view_invoice').'</a>', 'label' => ctrans('texts.view_invoice')];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->entity_string == 'quote') {
|
if ($this->entity_string == 'quote') {
|
||||||
@ -139,6 +128,7 @@ class HtmlEngine
|
|||||||
$data['$number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.quote_number')];
|
$data['$number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.quote_number')];
|
||||||
$data['$entity.terms'] = ['value' => $this->entity->terms ?: ' ', 'label' => ctrans('texts.quote_terms')];
|
$data['$entity.terms'] = ['value' => $this->entity->terms ?: ' ', 'label' => ctrans('texts.quote_terms')];
|
||||||
$data['$terms'] = &$data['$entity.terms'];
|
$data['$terms'] = &$data['$entity.terms'];
|
||||||
|
$data['$view_link'] = ['value' => '<a href="' .$this->invitation->getLink() .'">'. ctrans('texts.view_quote').'</a>', 'label' => ctrans('texts.view_quote')];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->entity_string == 'credit') {
|
if ($this->entity_string == 'credit') {
|
||||||
@ -146,6 +136,7 @@ class HtmlEngine
|
|||||||
$data['$number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.credit_number')];
|
$data['$number'] = ['value' => $this->entity->number ?: ' ', 'label' => ctrans('texts.credit_number')];
|
||||||
$data['$entity.terms'] = ['value' => $this->entity->terms ?: ' ', 'label' => ctrans('texts.credit_terms')];
|
$data['$entity.terms'] = ['value' => $this->entity->terms ?: ' ', 'label' => ctrans('texts.credit_terms')];
|
||||||
$data['$terms'] = &$data['$entity.terms'];
|
$data['$terms'] = &$data['$entity.terms'];
|
||||||
|
$data['$view_link'] = ['value' => '<a href="' .$this->invitation->getLink() .'">'. ctrans('texts.view_credit').'</a>', 'label' => ctrans('texts.view_credit')];
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['$entity_number'] = &$data['$number'];
|
$data['$entity_number'] = &$data['$number'];
|
||||||
|
@ -187,6 +187,7 @@ trait MakesInvoiceValues
|
|||||||
}
|
}
|
||||||
|
|
||||||
$calc = $this->calc();
|
$calc = $this->calc();
|
||||||
|
$invitation = $this->invitations->where('client_contact_id', $contact->id)->first();
|
||||||
|
|
||||||
$data = [];
|
$data = [];
|
||||||
$data['$tax'] = ['value' => '', 'label' => ctrans('texts.tax')];
|
$data['$tax'] = ['value' => '', 'label' => ctrans('texts.tax')];
|
||||||
@ -214,6 +215,7 @@ trait MakesInvoiceValues
|
|||||||
$data['$number'] = ['value' => $this->number ?: ' ', 'label' => ctrans('texts.invoice_number')];
|
$data['$number'] = ['value' => $this->number ?: ' ', 'label' => ctrans('texts.invoice_number')];
|
||||||
$data['$entity.terms'] = ['value' => $this->terms ?: ' ', 'label' => ctrans('texts.invoice_terms')];
|
$data['$entity.terms'] = ['value' => $this->terms ?: ' ', 'label' => ctrans('texts.invoice_terms')];
|
||||||
$data['$terms'] = &$data['$entity.terms'];
|
$data['$terms'] = &$data['$entity.terms'];
|
||||||
|
$data['$view_link'] = ['value' => '<a href="' .$invitation->getLink() .'">'. ctrans('texts.view_invoice').'</a>', 'label' => ctrans('texts.view_invoice')];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this instanceof Quote) {
|
if ($this instanceof Quote) {
|
||||||
@ -221,6 +223,7 @@ trait MakesInvoiceValues
|
|||||||
$data['$number'] = ['value' => $this->number ?: ' ', 'label' => ctrans('texts.quote_number')];
|
$data['$number'] = ['value' => $this->number ?: ' ', 'label' => ctrans('texts.quote_number')];
|
||||||
$data['$entity.terms'] = ['value' => $this->terms ?: ' ', 'label' => ctrans('texts.quote_terms')];
|
$data['$entity.terms'] = ['value' => $this->terms ?: ' ', 'label' => ctrans('texts.quote_terms')];
|
||||||
$data['$terms'] = &$data['$entity.terms'];
|
$data['$terms'] = &$data['$entity.terms'];
|
||||||
|
$data['$view_link'] = ['value' => '<a href="' .$invitation->getLink() .'">'. ctrans('texts.view_quote').'</a>', 'label' => ctrans('texts.view_quote')];
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this instanceof Credit) {
|
if ($this instanceof Credit) {
|
||||||
@ -228,6 +231,7 @@ trait MakesInvoiceValues
|
|||||||
$data['$number'] = ['value' => $this->number ?: ' ', 'label' => ctrans('texts.credit_number')];
|
$data['$number'] = ['value' => $this->number ?: ' ', 'label' => ctrans('texts.credit_number')];
|
||||||
$data['$entity.terms'] = ['value' => $this->terms ?: ' ', 'label' => ctrans('texts.credit_terms')];
|
$data['$entity.terms'] = ['value' => $this->terms ?: ' ', 'label' => ctrans('texts.credit_terms')];
|
||||||
$data['$terms'] = &$data['$entity.terms'];
|
$data['$terms'] = &$data['$entity.terms'];
|
||||||
|
$data['$view_link'] = ['value' => '<a href="' .$invitation->getLink() .'">'. ctrans('texts.view_credit').'</a>', 'label' => ctrans('texts.view_credit')];
|
||||||
}
|
}
|
||||||
|
|
||||||
$data['$entity_number'] = &$data['$number'];
|
$data['$entity_number'] = &$data['$number'];
|
||||||
|
291
composer.lock
generated
291
composer.lock
generated
@ -107,16 +107,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aws/aws-sdk-php",
|
"name": "aws/aws-sdk-php",
|
||||||
"version": "3.147.2",
|
"version": "3.147.8",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||||
"reference": "c58688f53c730b74cec1b6cfee8d9ed5bb40d946"
|
"reference": "b121ee1d69d3a1200ebc22d937cd40043b96a940"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c58688f53c730b74cec1b6cfee8d9ed5bb40d946",
|
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/b121ee1d69d3a1200ebc22d937cd40043b96a940",
|
||||||
"reference": "c58688f53c730b74cec1b6cfee8d9ed5bb40d946",
|
"reference": "b121ee1d69d3a1200ebc22d937cd40043b96a940",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -188,7 +188,7 @@
|
|||||||
"s3",
|
"s3",
|
||||||
"sdk"
|
"sdk"
|
||||||
],
|
],
|
||||||
"time": "2020-07-21T18:11:40+00:00"
|
"time": "2020-07-29T18:16:33+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "checkout/checkout-sdk-php",
|
"name": "checkout/checkout-sdk-php",
|
||||||
@ -1103,6 +1103,20 @@
|
|||||||
"sqlserver",
|
"sqlserver",
|
||||||
"sqlsrv"
|
"sqlsrv"
|
||||||
],
|
],
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://www.doctrine-project.org/sponsorship.html",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.patreon.com/phpdoctrine",
|
||||||
|
"type": "patreon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdbal",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
"time": "2020-04-20T17:19:26+00:00"
|
"time": "2020-04-20T17:19:26+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -1671,16 +1685,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "google/apiclient",
|
"name": "google/apiclient",
|
||||||
"version": "v2.6.0",
|
"version": "v2.7.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/googleapis/google-api-php-client.git",
|
"url": "https://github.com/googleapis/google-api-php-client.git",
|
||||||
"reference": "326e37fde5145079b74f1ce7249d242739d53cbc"
|
"reference": "48ec94577b51bde415270116118b07a294e07c43"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/326e37fde5145079b74f1ce7249d242739d53cbc",
|
"url": "https://api.github.com/repos/googleapis/google-api-php-client/zipball/48ec94577b51bde415270116118b07a294e07c43",
|
||||||
"reference": "326e37fde5145079b74f1ce7249d242739d53cbc",
|
"reference": "48ec94577b51bde415270116118b07a294e07c43",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1695,6 +1709,7 @@
|
|||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"cache/filesystem-adapter": "^0.3.2",
|
"cache/filesystem-adapter": "^0.3.2",
|
||||||
|
"composer/composer": "^1.10",
|
||||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
|
"dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
|
||||||
"phpcompatibility/php-compatibility": "^9.2",
|
"phpcompatibility/php-compatibility": "^9.2",
|
||||||
"phpunit/phpunit": "^4.8.36|^5.0",
|
"phpunit/phpunit": "^4.8.36|^5.0",
|
||||||
@ -1728,20 +1743,20 @@
|
|||||||
"keywords": [
|
"keywords": [
|
||||||
"google"
|
"google"
|
||||||
],
|
],
|
||||||
"time": "2020-07-10T17:05:22+00:00"
|
"time": "2020-07-23T21:37:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "google/apiclient-services",
|
"name": "google/apiclient-services",
|
||||||
"version": "v0.139",
|
"version": "v0.141",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/googleapis/google-api-php-client-services.git",
|
"url": "https://github.com/googleapis/google-api-php-client-services.git",
|
||||||
"reference": "84e99f792cae7bd92b8b54c75b0ad3502d628db6"
|
"reference": "4ba7279b0a56366e4f19b9d1a1b5456f99353b6f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/84e99f792cae7bd92b8b54c75b0ad3502d628db6",
|
"url": "https://api.github.com/repos/googleapis/google-api-php-client-services/zipball/4ba7279b0a56366e4f19b9d1a1b5456f99353b6f",
|
||||||
"reference": "84e99f792cae7bd92b8b54c75b0ad3502d628db6",
|
"reference": "4ba7279b0a56366e4f19b9d1a1b5456f99353b6f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1765,20 +1780,20 @@
|
|||||||
"keywords": [
|
"keywords": [
|
||||||
"google"
|
"google"
|
||||||
],
|
],
|
||||||
"time": "2020-06-08T00:24:31+00:00"
|
"time": "2020-07-27T00:25:27+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "google/auth",
|
"name": "google/auth",
|
||||||
"version": "v1.10.0",
|
"version": "v1.11.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/googleapis/google-auth-library-php.git",
|
"url": "https://github.com/googleapis/google-auth-library-php.git",
|
||||||
"reference": "077d6ae98d550161d3b2a0ba283bdce785c74d85"
|
"reference": "bb959e91bd8ffbd352ab76cbf11d656ce6435088"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/077d6ae98d550161d3b2a0ba283bdce785c74d85",
|
"url": "https://api.github.com/repos/googleapis/google-auth-library-php/zipball/bb959e91bd8ffbd352ab76cbf11d656ce6435088",
|
||||||
"reference": "077d6ae98d550161d3b2a0ba283bdce785c74d85",
|
"reference": "bb959e91bd8ffbd352ab76cbf11d656ce6435088",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1817,7 +1832,7 @@
|
|||||||
"google",
|
"google",
|
||||||
"oauth2"
|
"oauth2"
|
||||||
],
|
],
|
||||||
"time": "2020-07-08T19:11:36+00:00"
|
"time": "2020-07-27T18:33:35+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "guzzlehttp/guzzle",
|
"name": "guzzlehttp/guzzle",
|
||||||
@ -2449,16 +2464,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v6.18.26",
|
"version": "v6.18.31",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "d11b6168c65251ffa81ae0dfaf017ad2f30013da"
|
"reference": "a731824421f9ebc586728ea9c7cff231a249aaa9"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/d11b6168c65251ffa81ae0dfaf017ad2f30013da",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/a731824421f9ebc586728ea9c7cff231a249aaa9",
|
||||||
"reference": "d11b6168c65251ffa81ae0dfaf017ad2f30013da",
|
"reference": "a731824421f9ebc586728ea9c7cff231a249aaa9",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -2593,7 +2608,7 @@
|
|||||||
"framework",
|
"framework",
|
||||||
"laravel"
|
"laravel"
|
||||||
],
|
],
|
||||||
"time": "2020-07-21T14:25:39+00:00"
|
"time": "2020-07-27T18:23:18+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/slack-notification-channel",
|
"name": "laravel/slack-notification-channel",
|
||||||
@ -2877,16 +2892,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem",
|
"name": "league/flysystem",
|
||||||
"version": "1.0.69",
|
"version": "1.0.70",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/flysystem.git",
|
"url": "https://github.com/thephpleague/flysystem.git",
|
||||||
"reference": "7106f78428a344bc4f643c233a94e48795f10967"
|
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/7106f78428a344bc4f643c233a94e48795f10967",
|
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/585824702f534f8d3cf7fab7225e8466cc4b7493",
|
||||||
"reference": "7106f78428a344bc4f643c233a94e48795f10967",
|
"reference": "585824702f534f8d3cf7fab7225e8466cc4b7493",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -2897,7 +2912,7 @@
|
|||||||
"league/flysystem-sftp": "<1.0.6"
|
"league/flysystem-sftp": "<1.0.6"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpspec/phpspec": "^3.4",
|
"phpspec/phpspec": "^3.4 || ^4.0 || ^5.0 || ^6.0",
|
||||||
"phpunit/phpunit": "^5.7.26"
|
"phpunit/phpunit": "^5.7.26"
|
||||||
},
|
},
|
||||||
"suggest": {
|
"suggest": {
|
||||||
@ -2963,7 +2978,7 @@
|
|||||||
"type": "other"
|
"type": "other"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-18T15:13:39+00:00"
|
"time": "2020-07-26T07:20:36+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem-aws-s3-v3",
|
"name": "league/flysystem-aws-s3-v3",
|
||||||
@ -3014,16 +3029,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/flysystem-cached-adapter",
|
"name": "league/flysystem-cached-adapter",
|
||||||
"version": "1.0.9",
|
"version": "1.1.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/thephpleague/flysystem-cached-adapter.git",
|
"url": "https://github.com/thephpleague/flysystem-cached-adapter.git",
|
||||||
"reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f"
|
"reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/08ef74e9be88100807a3b92cc9048a312bf01d6f",
|
"url": "https://api.github.com/repos/thephpleague/flysystem-cached-adapter/zipball/d1925efb2207ac4be3ad0c40b8277175f99ffaff",
|
||||||
"reference": "08ef74e9be88100807a3b92cc9048a312bf01d6f",
|
"reference": "d1925efb2207ac4be3ad0c40b8277175f99ffaff",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -3057,7 +3072,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"description": "An adapter decorator to enable meta-data caching.",
|
"description": "An adapter decorator to enable meta-data caching.",
|
||||||
"time": "2018-07-09T20:51:04+00:00"
|
"time": "2020-07-25T15:56:04+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "league/fractal",
|
"name": "league/fractal",
|
||||||
@ -3507,16 +3522,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
"version": "2.1.0",
|
"version": "2.1.1",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Seldaek/monolog.git",
|
"url": "https://github.com/Seldaek/monolog.git",
|
||||||
"reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1"
|
"reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1",
|
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/f9eee5cec93dfb313a38b6b288741e84e53f02d5",
|
||||||
"reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1",
|
"reference": "f9eee5cec93dfb313a38b6b288741e84e53f02d5",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -3594,7 +3609,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-22T08:12:19+00:00"
|
"time": "2020-07-23T08:41:23+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "mtdowling/jmespath.php",
|
"name": "mtdowling/jmespath.php",
|
||||||
@ -3701,16 +3716,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nesbot/carbon",
|
"name": "nesbot/carbon",
|
||||||
"version": "2.36.1",
|
"version": "2.37.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/briannesbitt/Carbon.git",
|
"url": "https://github.com/briannesbitt/Carbon.git",
|
||||||
"reference": "ee7378a36cc62952100e718bcc58be4c7210e55f"
|
"reference": "1f61206de973d67f36ce50f041c792ddac663c3e"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/ee7378a36cc62952100e718bcc58be4c7210e55f",
|
"url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/1f61206de973d67f36ce50f041c792ddac663c3e",
|
||||||
"reference": "ee7378a36cc62952100e718bcc58be4c7210e55f",
|
"reference": "1f61206de973d67f36ce50f041c792ddac663c3e",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -3786,20 +3801,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-04T12:29:56+00:00"
|
"time": "2020-07-28T06:04:54+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v4.6.0",
|
"version": "v4.7.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||||
"reference": "c346bbfafe2ff60680258b631afb730d186ed864"
|
"reference": "21dce06dfbf0365c6a7cc8fdbdc995926c6a9300"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/c346bbfafe2ff60680258b631afb730d186ed864",
|
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/21dce06dfbf0365c6a7cc8fdbdc995926c6a9300",
|
||||||
"reference": "c346bbfafe2ff60680258b631afb730d186ed864",
|
"reference": "21dce06dfbf0365c6a7cc8fdbdc995926c6a9300",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -3816,7 +3831,7 @@
|
|||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-master": "4.3-dev"
|
"dev-master": "4.7-dev"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -3838,7 +3853,7 @@
|
|||||||
"parser",
|
"parser",
|
||||||
"php"
|
"php"
|
||||||
],
|
],
|
||||||
"time": "2020-07-02T17:12:47+00:00"
|
"time": "2020-07-25T13:18:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "nwidart/laravel-modules",
|
"name": "nwidart/laravel-modules",
|
||||||
@ -5665,16 +5680,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sentry/sentry",
|
"name": "sentry/sentry",
|
||||||
"version": "2.4.1",
|
"version": "2.4.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/getsentry/sentry-php.git",
|
"url": "https://github.com/getsentry/sentry-php.git",
|
||||||
"reference": "407573e22e6cc46b72cff07c117eeb16bf3a17de"
|
"reference": "b3b4f4a08b184c3f22b208f357e8720ef42938b0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/407573e22e6cc46b72cff07c117eeb16bf3a17de",
|
"url": "https://api.github.com/repos/getsentry/sentry-php/zipball/b3b4f4a08b184c3f22b208f357e8720ef42938b0",
|
||||||
"reference": "407573e22e6cc46b72cff07c117eeb16bf3a17de",
|
"reference": "b3b4f4a08b184c3f22b208f357e8720ef42938b0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -5758,7 +5773,7 @@
|
|||||||
"type": "custom"
|
"type": "custom"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-07-03T09:58:40+00:00"
|
"time": "2020-07-24T07:02:19+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "sentry/sentry-laravel",
|
"name": "sentry/sentry-laravel",
|
||||||
@ -6096,16 +6111,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "stripe/stripe-php",
|
"name": "stripe/stripe-php",
|
||||||
"version": "v7.44.0",
|
"version": "v7.45.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/stripe/stripe-php.git",
|
"url": "https://github.com/stripe/stripe-php.git",
|
||||||
"reference": "b39ccc77358fbe0d462e6cc89ac01b7a0c896f35"
|
"reference": "21e5001f5e0d787e4755c8bfc00e578dce9ae058"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/b39ccc77358fbe0d462e6cc89ac01b7a0c896f35",
|
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/21e5001f5e0d787e4755c8bfc00e578dce9ae058",
|
||||||
"reference": "b39ccc77358fbe0d462e6cc89ac01b7a0c896f35",
|
"reference": "21e5001f5e0d787e4755c8bfc00e578dce9ae058",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -6149,7 +6164,7 @@
|
|||||||
"payment processing",
|
"payment processing",
|
||||||
"stripe"
|
"stripe"
|
||||||
],
|
],
|
||||||
"time": "2020-07-20T21:25:50+00:00"
|
"time": "2020-07-29T04:29:52+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "swiftmailer/swiftmailer",
|
"name": "swiftmailer/swiftmailer",
|
||||||
@ -6215,16 +6230,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/console.git",
|
"url": "https://github.com/symfony/console.git",
|
||||||
"reference": "326b064d804043005526f5a0494cfb49edb59bb0"
|
"reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/console/zipball/326b064d804043005526f5a0494cfb49edb59bb0",
|
"url": "https://api.github.com/repos/symfony/console/zipball/55d07021da933dd0d633ffdab6f45d5b230c7e02",
|
||||||
"reference": "326b064d804043005526f5a0494cfb49edb59bb0",
|
"reference": "55d07021da933dd0d633ffdab6f45d5b230c7e02",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -6302,11 +6317,11 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-30T20:06:45+00:00"
|
"time": "2020-07-06T13:18:39+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/css-selector",
|
"name": "symfony/css-selector",
|
||||||
"version": "v5.1.2",
|
"version": "v5.1.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/css-selector.git",
|
"url": "https://github.com/symfony/css-selector.git",
|
||||||
@ -6373,16 +6388,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/debug",
|
"name": "symfony/debug",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/debug.git",
|
"url": "https://github.com/symfony/debug.git",
|
||||||
"reference": "28f92d08bb6d1fddf8158e02c194ad43870007e6"
|
"reference": "47aa9064d75db36389692dd4d39895a0820f00f2"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/debug/zipball/28f92d08bb6d1fddf8158e02c194ad43870007e6",
|
"url": "https://api.github.com/repos/symfony/debug/zipball/47aa9064d75db36389692dd4d39895a0820f00f2",
|
||||||
"reference": "28f92d08bb6d1fddf8158e02c194ad43870007e6",
|
"reference": "47aa9064d75db36389692dd4d39895a0820f00f2",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -6440,7 +6455,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-24T08:33:35+00:00"
|
"time": "2020-07-23T08:31:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/deprecation-contracts",
|
"name": "symfony/deprecation-contracts",
|
||||||
@ -6508,16 +6523,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/error-handler",
|
"name": "symfony/error-handler",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/error-handler.git",
|
"url": "https://github.com/symfony/error-handler.git",
|
||||||
"reference": "0df9a23c0f9eddbb6682479fee6fd58b88add75b"
|
"reference": "66f151360550ec2b3273b3746febb12e6ba0348b"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/error-handler/zipball/0df9a23c0f9eddbb6682479fee6fd58b88add75b",
|
"url": "https://api.github.com/repos/symfony/error-handler/zipball/66f151360550ec2b3273b3746febb12e6ba0348b",
|
||||||
"reference": "0df9a23c0f9eddbb6682479fee6fd58b88add75b",
|
"reference": "66f151360550ec2b3273b3746febb12e6ba0348b",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -6575,20 +6590,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-28T10:39:14+00:00"
|
"time": "2020-07-23T08:35:20+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher",
|
"name": "symfony/event-dispatcher",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||||
"reference": "a5370aaa7807c7a439b21386661ffccf3dff2866"
|
"reference": "6140fc7047dafc5abbe84ba16a34a86c0b0229b8"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/a5370aaa7807c7a439b21386661ffccf3dff2866",
|
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/6140fc7047dafc5abbe84ba16a34a86c0b0229b8",
|
||||||
"reference": "a5370aaa7807c7a439b21386661ffccf3dff2866",
|
"reference": "6140fc7047dafc5abbe84ba16a34a86c0b0229b8",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -6659,7 +6674,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-20T08:37:50+00:00"
|
"time": "2020-06-18T17:59:13+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/event-dispatcher-contracts",
|
"name": "symfony/event-dispatcher-contracts",
|
||||||
@ -6739,7 +6754,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/filesystem",
|
"name": "symfony/filesystem",
|
||||||
"version": "v5.1.2",
|
"version": "v5.1.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/filesystem.git",
|
"url": "https://github.com/symfony/filesystem.git",
|
||||||
@ -6803,20 +6818,20 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/finder",
|
"name": "symfony/finder",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/finder.git",
|
"url": "https://github.com/symfony/finder.git",
|
||||||
"reference": "5729f943f9854c5781984ed4907bbb817735776b"
|
"reference": "2727aa35fddfada1dd37599948528e9b152eb742"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/finder/zipball/5729f943f9854c5781984ed4907bbb817735776b",
|
"url": "https://api.github.com/repos/symfony/finder/zipball/2727aa35fddfada1dd37599948528e9b152eb742",
|
||||||
"reference": "5729f943f9854c5781984ed4907bbb817735776b",
|
"reference": "2727aa35fddfada1dd37599948528e9b152eb742",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3"
|
"php": ">=7.1.3"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@ -6862,20 +6877,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-03-27T16:54:36+00:00"
|
"time": "2020-07-05T09:39:30+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-foundation",
|
"name": "symfony/http-foundation",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-foundation.git",
|
"url": "https://github.com/symfony/http-foundation.git",
|
||||||
"reference": "3adfbd7098c850b02d107330b7b9deacf2581578"
|
"reference": "3675676b6a47f3e71d3ab10bcf53fb9239eb77e6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/3adfbd7098c850b02d107330b7b9deacf2581578",
|
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/3675676b6a47f3e71d3ab10bcf53fb9239eb77e6",
|
||||||
"reference": "3adfbd7098c850b02d107330b7b9deacf2581578",
|
"reference": "3675676b6a47f3e71d3ab10bcf53fb9239eb77e6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -6931,20 +6946,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-23T09:11:46+00:00"
|
"time": "2020-07-23T09:48:09+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/http-kernel",
|
"name": "symfony/http-kernel",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/http-kernel.git",
|
"url": "https://github.com/symfony/http-kernel.git",
|
||||||
"reference": "81d42148474e1852a333ed7a732f2a014af75430"
|
"reference": "a675d2bf04a9328f164910cae6e3918b295151f3"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/81d42148474e1852a333ed7a732f2a014af75430",
|
"url": "https://api.github.com/repos/symfony/http-kernel/zipball/a675d2bf04a9328f164910cae6e3918b295151f3",
|
||||||
"reference": "81d42148474e1852a333ed7a732f2a014af75430",
|
"reference": "a675d2bf04a9328f164910cae6e3918b295151f3",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -7036,20 +7051,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-06-12T11:15:37+00:00"
|
"time": "2020-07-24T04:10:09+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/mime",
|
"name": "symfony/mime",
|
||||||
"version": "v5.1.2",
|
"version": "v5.1.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/mime.git",
|
"url": "https://github.com/symfony/mime.git",
|
||||||
"reference": "c0c418f05e727606e85b482a8591519c4712cf45"
|
"reference": "149fb0ad35aae3c7637b496b38478797fa6a7ea6"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/mime/zipball/c0c418f05e727606e85b482a8591519c4712cf45",
|
"url": "https://api.github.com/repos/symfony/mime/zipball/149fb0ad35aae3c7637b496b38478797fa6a7ea6",
|
||||||
"reference": "c0c418f05e727606e85b482a8591519c4712cf45",
|
"reference": "149fb0ad35aae3c7637b496b38478797fa6a7ea6",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -7113,20 +7128,20 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-06-09T15:07:35+00:00"
|
"time": "2020-07-23T10:04:31+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/options-resolver",
|
"name": "symfony/options-resolver",
|
||||||
"version": "v5.1.2",
|
"version": "v5.1.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/options-resolver.git",
|
"url": "https://github.com/symfony/options-resolver.git",
|
||||||
"reference": "663f5dd5e14057d1954fe721f9709d35837f2447"
|
"reference": "9ff59517938f88d90b6e65311fef08faa640f681"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/663f5dd5e14057d1954fe721f9709d35837f2447",
|
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/9ff59517938f88d90b6e65311fef08faa640f681",
|
||||||
"reference": "663f5dd5e14057d1954fe721f9709d35837f2447",
|
"reference": "9ff59517938f88d90b6e65311fef08faa640f681",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -7183,7 +7198,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-23T13:08:13+00:00"
|
"time": "2020-07-12T12:58:00+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/polyfill-ctype",
|
"name": "symfony/polyfill-ctype",
|
||||||
@ -7966,20 +7981,20 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/process.git",
|
"url": "https://github.com/symfony/process.git",
|
||||||
"reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5"
|
"reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/process/zipball/c714958428a85c86ab97e3a0c96db4c4f381b7f5",
|
"url": "https://api.github.com/repos/symfony/process/zipball/65e70bab62f3da7089a8d4591fb23fbacacb3479",
|
||||||
"reference": "c714958428a85c86ab97e3a0c96db4c4f381b7f5",
|
"reference": "65e70bab62f3da7089a8d4591fb23fbacacb3479",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3"
|
"php": ">=7.1.3"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@ -8025,24 +8040,24 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-30T20:06:45+00:00"
|
"time": "2020-07-23T08:31:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/routing",
|
"name": "symfony/routing",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/routing.git",
|
"url": "https://github.com/symfony/routing.git",
|
||||||
"reference": "0f557911dde75c2a9652b8097bd7c9f54507f646"
|
"reference": "e103381a4c2f0731c14589041852bf979e97c7af"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/routing/zipball/0f557911dde75c2a9652b8097bd7c9f54507f646",
|
"url": "https://api.github.com/repos/symfony/routing/zipball/e103381a4c2f0731c14589041852bf979e97c7af",
|
||||||
"reference": "0f557911dde75c2a9652b8097bd7c9f54507f646",
|
"reference": "e103381a4c2f0731c14589041852bf979e97c7af",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.1.3"
|
"php": ">=7.1.3"
|
||||||
},
|
},
|
||||||
"conflict": {
|
"conflict": {
|
||||||
"symfony/config": "<4.2",
|
"symfony/config": "<4.2",
|
||||||
@ -8115,7 +8130,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-30T20:07:26+00:00"
|
"time": "2020-07-05T09:39:30+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/service-contracts",
|
"name": "symfony/service-contracts",
|
||||||
@ -8195,16 +8210,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation",
|
"name": "symfony/translation",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/translation.git",
|
"url": "https://github.com/symfony/translation.git",
|
||||||
"reference": "79d3ef9096a6a6047dbc69218b68c7b7f63193af"
|
"reference": "a8ea9d97353294eb6783f2894ef8cee99a045822"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/translation/zipball/79d3ef9096a6a6047dbc69218b68c7b7f63193af",
|
"url": "https://api.github.com/repos/symfony/translation/zipball/a8ea9d97353294eb6783f2894ef8cee99a045822",
|
||||||
"reference": "79d3ef9096a6a6047dbc69218b68c7b7f63193af",
|
"reference": "a8ea9d97353294eb6783f2894ef8cee99a045822",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -8281,7 +8296,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-30T20:06:45+00:00"
|
"time": "2020-07-23T08:31:43+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/translation-contracts",
|
"name": "symfony/translation-contracts",
|
||||||
@ -8360,16 +8375,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/var-dumper",
|
"name": "symfony/var-dumper",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/var-dumper.git",
|
"url": "https://github.com/symfony/var-dumper.git",
|
||||||
"reference": "56b3aa5eab0ac6720dcd559fd1d590ce301594ac"
|
"reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/56b3aa5eab0ac6720dcd559fd1d590ce301594ac",
|
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/2125805a1a4e57f2340bc566c3013ca94d2722dc",
|
||||||
"reference": "56b3aa5eab0ac6720dcd559fd1d590ce301594ac",
|
"reference": "2125805a1a4e57f2340bc566c3013ca94d2722dc",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -8447,7 +8462,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2020-05-30T20:06:45+00:00"
|
"time": "2020-06-24T13:34:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "tijsverkoyen/css-to-inline-styles",
|
"name": "tijsverkoyen/css-to-inline-styles",
|
||||||
@ -10922,16 +10937,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "swagger-api/swagger-ui",
|
"name": "swagger-api/swagger-ui",
|
||||||
"version": "v3.30.1",
|
"version": "v3.30.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/swagger-api/swagger-ui.git",
|
"url": "https://github.com/swagger-api/swagger-ui.git",
|
||||||
"reference": "c654d08af86f1eb54b80f16d7ab0087170d56a67"
|
"reference": "d8521c1bc067cfa57108ecf8f1a513db039ff1da"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/c654d08af86f1eb54b80f16d7ab0087170d56a67",
|
"url": "https://api.github.com/repos/swagger-api/swagger-ui/zipball/d8521c1bc067cfa57108ecf8f1a513db039ff1da",
|
||||||
"reference": "c654d08af86f1eb54b80f16d7ab0087170d56a67",
|
"reference": "d8521c1bc067cfa57108ecf8f1a513db039ff1da",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
@ -10975,11 +10990,11 @@
|
|||||||
"swagger",
|
"swagger",
|
||||||
"ui"
|
"ui"
|
||||||
],
|
],
|
||||||
"time": "2020-07-21T19:36:10+00:00"
|
"time": "2020-07-22T20:37:48+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/yaml",
|
"name": "symfony/yaml",
|
||||||
"version": "v4.4.10",
|
"version": "v4.4.11",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/yaml.git",
|
"url": "https://github.com/symfony/yaml.git",
|
||||||
|
@ -78,7 +78,6 @@ return [
|
|||||||
],
|
],
|
||||||
'contacts' => [
|
'contacts' => [
|
||||||
'driver' => 'eloquent',
|
'driver' => 'eloquent',
|
||||||
|
|
||||||
'model' => App\Models\ClientContact::class,
|
'model' => App\Models\ClientContact::class,
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@ Route::group(['api_secret_check', 'email_db'], function () {
|
|||||||
Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () {
|
Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () {
|
||||||
|
|
||||||
Route::get('ping', 'PingController@index')->name('ping');
|
Route::get('ping', 'PingController@index')->name('ping');
|
||||||
|
Route::get('health_check', 'PingController@health')->name('health_check');
|
||||||
|
|
||||||
Route::resource('activities', 'ActivityController');// name = (clients. index / create / show / update / destroy / edit
|
Route::resource('activities', 'ActivityController');// name = (clients. index / create / show / update / destroy / edit
|
||||||
|
|
||||||
|
95
tests/Feature/GroupSettingTest.php
Normal file
95
tests/Feature/GroupSettingTest.php
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Feature;
|
||||||
|
|
||||||
|
use App\Models\Account;
|
||||||
|
use App\Models\Client;
|
||||||
|
use App\Models\Credit;
|
||||||
|
use App\Utils\Traits\MakesHash;
|
||||||
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||||
|
use Tests\MockAccountData;
|
||||||
|
use Tests\TestCase;
|
||||||
|
use Illuminate\Support\Facades\Session;
|
||||||
|
use Illuminate\Database\Eloquent\Model;
|
||||||
|
|
||||||
|
class GroupSettingTest extends TestCase
|
||||||
|
{
|
||||||
|
use MakesHash;
|
||||||
|
use DatabaseTransactions;
|
||||||
|
use MockAccountData;
|
||||||
|
|
||||||
|
public function setUp(): void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
Session::start();
|
||||||
|
|
||||||
|
$this->faker = \Faker\Factory::create();
|
||||||
|
|
||||||
|
Model::reguard();
|
||||||
|
|
||||||
|
$this->makeTestData();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testAddGroupSettings()
|
||||||
|
{
|
||||||
|
$settings = new \stdClass;
|
||||||
|
$settings->currency_id = 1;
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => 'test',
|
||||||
|
'settings' => $settings
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->withHeaders([
|
||||||
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
|
'X-API-TOKEN' => $this->token,
|
||||||
|
])->post('/api/v1/group_settings', $data);
|
||||||
|
|
||||||
|
$response->assertStatus(200);
|
||||||
|
|
||||||
|
$arr = $response->json();
|
||||||
|
|
||||||
|
$this->assertEquals('test', $arr['data']['name']);
|
||||||
|
$this->assertEquals(0, $arr['data']['archived_at']);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function testArchiveGroupSettings()
|
||||||
|
{
|
||||||
|
$settings = new \stdClass;
|
||||||
|
$settings->currency_id = 1;
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => 'test',
|
||||||
|
'settings' => $settings
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->withHeaders([
|
||||||
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
|
'X-API-TOKEN' => $this->token,
|
||||||
|
])->post('/api/v1/group_settings', $data);
|
||||||
|
|
||||||
|
$response->assertStatus(200);
|
||||||
|
|
||||||
|
$arr = $response->json();
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'action' => 'archive',
|
||||||
|
'ids' => [$arr['data']['id']]
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->withHeaders([
|
||||||
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
|
'X-API-TOKEN' => $this->token,
|
||||||
|
])->post('/api/v1/group_settings/bulk', $data);
|
||||||
|
|
||||||
|
$response->assertStatus(200);
|
||||||
|
|
||||||
|
$arr = $response->json();
|
||||||
|
|
||||||
|
$this->assertNotNull($arr['data']['archived_at']);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -7,6 +7,7 @@ use App\Models\CompanyToken;
|
|||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
use Illuminate\Database\Eloquent\Model;
|
||||||
use Illuminate\Routing\Middleware\ThrottleRequests;
|
use Illuminate\Routing\Middleware\ThrottleRequests;
|
||||||
|
use Illuminate\Validation\ValidationException;
|
||||||
use Tests\MockAccountData;
|
use Tests\MockAccountData;
|
||||||
use Tests\TestCase;
|
use Tests\TestCase;
|
||||||
|
|
||||||
@ -37,21 +38,34 @@ class ShopInvoiceTest extends TestCase
|
|||||||
$this->withoutExceptionHandling();
|
$this->withoutExceptionHandling();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTokenFailure()
|
public function testTokenSuccess()
|
||||||
{
|
{
|
||||||
|
$this->company->enable_shop_api = true;
|
||||||
|
$this->company->save();
|
||||||
|
|
||||||
|
$response = null;
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-COMPANY-KEY' => $this->company->company_key
|
'X-API-COMPANY-KEY' => $this->company->company_key
|
||||||
])->get('/api/v1/shop/products');
|
])->get('api/v1/shop/products');
|
||||||
|
}
|
||||||
|
|
||||||
|
catch (ValidationException $e) {
|
||||||
|
$this->assertNotNull($message);
|
||||||
|
}
|
||||||
|
|
||||||
$response->assertStatus(200);
|
$response->assertStatus(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testTokenSuccess()
|
public function testTokenFailure()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$this->company->enable_shop_api = true;
|
||||||
|
$this->company->save();
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-COMPANY-KEY' => $this->company->company_key
|
'X-API-COMPANY-KEY' => $this->company->company_key
|
||||||
@ -63,8 +77,29 @@ class ShopInvoiceTest extends TestCase
|
|||||||
$arr = $response->json();
|
$arr = $response->json();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testCompanyEnableShopApiBooleanWorks()
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
|
||||||
|
$response = $this->withHeaders([
|
||||||
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
|
'X-API-COMPANY-KEY' => $this->company->company_key
|
||||||
|
])->get('api/v1/shop/products');
|
||||||
|
}
|
||||||
|
|
||||||
|
catch (ValidationException $e) {
|
||||||
|
$this->assertNotNull($message);
|
||||||
|
}
|
||||||
|
|
||||||
|
$response->assertStatus(403);
|
||||||
|
}
|
||||||
|
|
||||||
public function testGetByProductKey()
|
public function testGetByProductKey()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$this->company->enable_shop_api = true;
|
||||||
|
$this->company->save();
|
||||||
|
|
||||||
$product = factory(\App\Models\Product::class)->create([
|
$product = factory(\App\Models\Product::class)->create([
|
||||||
'user_id' => $this->user->id,
|
'user_id' => $this->user->id,
|
||||||
'company_id' => $this->company->id,
|
'company_id' => $this->company->id,
|
||||||
@ -86,6 +121,9 @@ class ShopInvoiceTest extends TestCase
|
|||||||
public function testGetByClientByContactKey()
|
public function testGetByClientByContactKey()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
$this->company->enable_shop_api = true;
|
||||||
|
$this->company->save();
|
||||||
|
|
||||||
$response = $this->withHeaders([
|
$response = $this->withHeaders([
|
||||||
'X-API-SECRET' => config('ninja.api_secret'),
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
'X-API-COMPANY-KEY' => $this->company->company_key
|
'X-API-COMPANY-KEY' => $this->company->company_key
|
||||||
@ -98,4 +136,69 @@ class ShopInvoiceTest extends TestCase
|
|||||||
$this->assertEquals($this->client->hashed_id, $arr['data']['id']);
|
$this->assertEquals($this->client->hashed_id, $arr['data']['id']);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function testCreateClientOnShopRoute()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->company->enable_shop_api = true;
|
||||||
|
$this->company->save();
|
||||||
|
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => 'ShopClient',
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->withHeaders([
|
||||||
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
|
'X-API-COMPANY-KEY' => $this->company->company_key
|
||||||
|
])->post('/api/v1/shop/clients/', $data);
|
||||||
|
|
||||||
|
|
||||||
|
$response->assertStatus(200);
|
||||||
|
$arr = $response->json();
|
||||||
|
|
||||||
|
$this->assertEquals('ShopClient', $arr['data']['name']);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testCreateInvoiceOnShopRoute()
|
||||||
|
{
|
||||||
|
|
||||||
|
$this->company->enable_shop_api = true;
|
||||||
|
$this->company->save();
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'name' => 'ShopClient',
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->withHeaders([
|
||||||
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
|
'X-API-COMPANY-KEY' => $this->company->company_key
|
||||||
|
])->post('/api/v1/shop/clients/', $data);
|
||||||
|
|
||||||
|
|
||||||
|
$response->assertStatus(200);
|
||||||
|
$arr = $response->json();
|
||||||
|
|
||||||
|
$client_hashed_id = $arr['data']['id'];
|
||||||
|
|
||||||
|
$invoice_data = [
|
||||||
|
'client_id' => $client_hashed_id,
|
||||||
|
'po_number' => 'shop_order'
|
||||||
|
];
|
||||||
|
|
||||||
|
$response = $this->withHeaders([
|
||||||
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
|
'X-API-COMPANY-KEY' => $this->company->company_key
|
||||||
|
])->post('/api/v1/shop/invoices/', $invoice_data);
|
||||||
|
|
||||||
|
|
||||||
|
$response->assertStatus(200);
|
||||||
|
$arr = $response->json();
|
||||||
|
|
||||||
|
$this->assertEquals('shop_order', $arr['data']['po_number']);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -92,7 +92,6 @@ class DesignTest extends TestCase
|
|||||||
|
|
||||||
$this->assertNotNull($html);
|
$this->assertNotNull($html);
|
||||||
|
|
||||||
|
|
||||||
$this->quote = factory(\App\Models\Invoice::class)->create([
|
$this->quote = factory(\App\Models\Invoice::class)->create([
|
||||||
'user_id' => $this->user->id,
|
'user_id' => $this->user->id,
|
||||||
'client_id' => $this->client->id,
|
'client_id' => $this->client->id,
|
||||||
|
38
tests/Integration/SystemHealthTest.php
Normal file
38
tests/Integration/SystemHealthTest.php
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Tests\Integration;
|
||||||
|
|
||||||
|
use Illuminate\Foundation\Testing\Concerns\InteractsWithDatabase;
|
||||||
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||||
|
use Illuminate\Support\Facades\Cache;
|
||||||
|
use Tests\MockAccountData;
|
||||||
|
use Tests\TestCase;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @test
|
||||||
|
*/
|
||||||
|
class SystemHealthTest extends TestCase
|
||||||
|
{
|
||||||
|
use DatabaseTransactions;
|
||||||
|
use MockAccountData;
|
||||||
|
|
||||||
|
public function setUp() :void
|
||||||
|
{
|
||||||
|
parent::setUp();
|
||||||
|
|
||||||
|
$this->makeTestData();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function testSystemHealthRouteAvailable()
|
||||||
|
{
|
||||||
|
$response = $this->withHeaders([
|
||||||
|
'X-API-SECRET' => config('ninja.api_secret'),
|
||||||
|
'X-API-TOKEN' => $this->token
|
||||||
|
])->get('/api/v1/health_check');
|
||||||
|
|
||||||
|
|
||||||
|
$response->assertStatus(200);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -225,6 +225,7 @@ trait MockAccountData
|
|||||||
$this->quote = $this->quote_calc->getQuote();
|
$this->quote = $this->quote_calc->getQuote();
|
||||||
|
|
||||||
$this->quote->number = $this->getNextQuoteNumber($this->client);
|
$this->quote->number = $this->getNextQuoteNumber($this->client);
|
||||||
|
$this->quote->service()->createInvitations()->markSent();
|
||||||
|
|
||||||
$this->quote->setRelation('client', $this->client);
|
$this->quote->setRelation('client', $this->client);
|
||||||
$this->quote->setRelation('company', $this->company);
|
$this->quote->setRelation('company', $this->company);
|
||||||
@ -242,6 +243,7 @@ trait MockAccountData
|
|||||||
|
|
||||||
$this->credit->save();
|
$this->credit->save();
|
||||||
|
|
||||||
|
$this->credit->service()->createInvitations()->markSent();
|
||||||
|
|
||||||
$this->credit_calc = new InvoiceSum($this->credit);
|
$this->credit_calc = new InvoiceSum($this->credit);
|
||||||
$this->credit_calc->build();
|
$this->credit_calc->build();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user