mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 21:22:58 +01:00
commit
f0dc32db97
@ -1 +1 @@
|
|||||||
5.1.18
|
5.1.19
|
@ -376,6 +376,8 @@ class CreditController extends BaseController
|
|||||||
|
|
||||||
$credit = $this->credit_repository->save($request->all(), $credit);
|
$credit = $this->credit_repository->save($request->all(), $credit);
|
||||||
|
|
||||||
|
$credit->service()->deletePdf();
|
||||||
|
|
||||||
event(new CreditWasUpdated($credit, $credit->company, Ninja::eventVars()));
|
event(new CreditWasUpdated($credit, $credit->company, Ninja::eventVars()));
|
||||||
|
|
||||||
return $this->itemResponse($credit);
|
return $this->itemResponse($credit);
|
||||||
|
@ -387,6 +387,8 @@ class QuoteController extends BaseController
|
|||||||
|
|
||||||
$quote = $this->quote_repo->save($request->all(), $quote);
|
$quote = $this->quote_repo->save($request->all(), $quote);
|
||||||
|
|
||||||
|
$quote->service()->deletePdf();
|
||||||
|
|
||||||
event(new QuoteWasUpdated($quote, $quote->company, Ninja::eventVars()));
|
event(new QuoteWasUpdated($quote, $quote->company, Ninja::eventVars()));
|
||||||
|
|
||||||
return $this->itemResponse($quote);
|
return $this->itemResponse($quote);
|
||||||
|
@ -374,6 +374,8 @@ class RecurringInvoiceController extends BaseController
|
|||||||
|
|
||||||
$recurring_invoice = $this->recurring_invoice_repo->save($request->all(), $recurring_invoice);
|
$recurring_invoice = $this->recurring_invoice_repo->save($request->all(), $recurring_invoice);
|
||||||
|
|
||||||
|
$recurring_invoice->service()->deletePdf()->save();
|
||||||
|
|
||||||
return $this->itemResponse($recurring_invoice);
|
return $this->itemResponse($recurring_invoice);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -209,6 +209,8 @@ class UserController extends BaseController
|
|||||||
|
|
||||||
$ct = CreateCompanyToken::dispatchNow($company, $user, $user_agent);
|
$ct = CreateCompanyToken::dispatchNow($company, $user, $user_agent);
|
||||||
|
|
||||||
|
nlog("in the store method of the usercontroller class");
|
||||||
|
|
||||||
event(new UserWasCreated($user, auth()->user(), $company, Ninja::eventVars()));
|
event(new UserWasCreated($user, auth()->user(), $company, Ninja::eventVars()));
|
||||||
|
|
||||||
return $this->itemResponse($user->fresh());
|
return $this->itemResponse($user->fresh());
|
||||||
@ -626,7 +628,7 @@ class UserController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Detach an existing user to a company.
|
* Invite an existing user to a company.
|
||||||
*
|
*
|
||||||
* @OA\Post(
|
* @OA\Post(
|
||||||
* path="/api/v1/users/{user}/invite",
|
* path="/api/v1/users/{user}/invite",
|
||||||
@ -682,4 +684,59 @@ class UserController extends BaseController
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invite an existing user to a company.
|
||||||
|
*
|
||||||
|
* @OA\Post(
|
||||||
|
* path="/api/v1/users/{user}/reconfirm",
|
||||||
|
* operationId="inviteUserReconfirm",
|
||||||
|
* tags={"users"},
|
||||||
|
* summary="Reconfirm an existing user to a company",
|
||||||
|
* description="Reconfirm an existing user from a company",
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Secret"),
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Api-Token"),
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/X-Requested-With"),
|
||||||
|
* @OA\Parameter(ref="#/components/parameters/include"),
|
||||||
|
* @OA\Parameter(
|
||||||
|
* name="user",
|
||||||
|
* in="path",
|
||||||
|
* description="The user hashed_id",
|
||||||
|
* example="FD767dfd7",
|
||||||
|
* required=true,
|
||||||
|
* @OA\Schema(
|
||||||
|
* type="string",
|
||||||
|
* format="string",
|
||||||
|
* ),
|
||||||
|
* ),
|
||||||
|
* @OA\Response(
|
||||||
|
* response=200,
|
||||||
|
* description="Success response",
|
||||||
|
* @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"),
|
||||||
|
* ),
|
||||||
|
* @OA\Response(
|
||||||
|
* response=422,
|
||||||
|
* description="Validation error",
|
||||||
|
* @OA\JsonContent(ref="#/components/schemas/ValidationError"),
|
||||||
|
*
|
||||||
|
* ),
|
||||||
|
* @OA\Response(
|
||||||
|
* response="default",
|
||||||
|
* description="Unexpected Error",
|
||||||
|
* @OA\JsonContent(ref="#/components/schemas/Error"),
|
||||||
|
* ),
|
||||||
|
* )
|
||||||
|
* @param ReconfirmUserRequest $request
|
||||||
|
* @param User $user
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
public function reconfirm(ReconfirmUserRequest $request, User $user)
|
||||||
|
{
|
||||||
|
|
||||||
|
$user->service()->invite($user->company());
|
||||||
|
|
||||||
|
return response()->json(['message' => ctrans('texts.confirmation_resent')], 200);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,6 +54,10 @@ class StoreDesignRequest extends Request
|
|||||||
$input['design']['footer'] = '';
|
$input['design']['footer'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! array_key_exists('header', $input['design']) || is_null($input['design']['header'])) {
|
||||||
|
$input['design']['header'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
$this->replace($input);
|
$this->replace($input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,6 +53,10 @@ class UpdateDesignRequest extends Request
|
|||||||
$input['design']['footer'] = '';
|
$input['design']['footer'] = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! array_key_exists('header', $input['design']) || is_null($input['design']['header'])) {
|
||||||
|
$input['design']['header'] = '';
|
||||||
|
}
|
||||||
|
|
||||||
$this->replace($input);
|
$this->replace($input);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,6 +23,6 @@ class ReconfirmUserRequest extends Request
|
|||||||
*/
|
*/
|
||||||
public function authorize() : bool
|
public function authorize() : bool
|
||||||
{
|
{
|
||||||
return auth()->user()->isAdmin();
|
return auth()->user()->id == $this->user->id;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -96,22 +96,6 @@ class CreateAccount
|
|||||||
//todo implement SLACK notifications
|
//todo implement SLACK notifications
|
||||||
//$sp035a66->notification(new NewAccountCreated($spaa9f78, $sp035a66))->ninja();
|
//$sp035a66->notification(new NewAccountCreated($spaa9f78, $sp035a66))->ninja();
|
||||||
|
|
||||||
// $nmo = new NinjaMailerObject;
|
|
||||||
// $nmo->mailable = new NinjaMailer((new AccountCreatedObject($spaa9f78, $sp035a66))->build());
|
|
||||||
// $nmo->company = $sp035a66;
|
|
||||||
// $nmo->to_user = $spaa9f78;
|
|
||||||
// $nmo->settings = $sp035a66->settings;
|
|
||||||
|
|
||||||
$nmo = new NinjaMailerObject;
|
|
||||||
$nmo->mailable = new NinjaMailer((new VerifyUserObject($spaa9f78, $sp035a66))->build());
|
|
||||||
$nmo->company = $sp035a66;
|
|
||||||
$nmo->to_user = $spaa9f78;
|
|
||||||
$nmo->settings = $sp035a66->settings;
|
|
||||||
|
|
||||||
NinjaMailerJob::dispatch($nmo);
|
|
||||||
|
|
||||||
// NinjaMailerJob::dispatchNow($nmo);
|
|
||||||
|
|
||||||
VersionCheck::dispatchNow();
|
VersionCheck::dispatchNow();
|
||||||
|
|
||||||
LightLogs::create(new AnalyticsAccountCreated())
|
LightLogs::create(new AnalyticsAccountCreated())
|
||||||
|
@ -82,8 +82,10 @@ class CreateUser
|
|||||||
'settings' => null,
|
'settings' => null,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if(!Ninja::isSelfHost())
|
if(!Ninja::isSelfHost()){
|
||||||
|
nlog("in the create user class");
|
||||||
event(new UserWasCreated($user, $user, $this->company, Ninja::eventVars()));
|
event(new UserWasCreated($user, $user, $this->company, Ninja::eventVars()));
|
||||||
|
}
|
||||||
|
|
||||||
return $user;
|
return $user;
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ class PaymentNotification implements ShouldQueue
|
|||||||
foreach ($payment->company->company_users as $company_user) {
|
foreach ($payment->company->company_users as $company_user) {
|
||||||
$user = $company_user->user;
|
$user = $company_user->user;
|
||||||
|
|
||||||
$methods = $this->findUserEntityNotificationType($payment, $company_user, ['all_notifications']);
|
$methods = $this->findUserEntityNotificationType($payment, $company_user, ['payment_success_all', 'all_notifications']);
|
||||||
|
|
||||||
if (($key = array_search('mail', $methods)) !== false) {
|
if (($key = array_search('mail', $methods)) !== false) {
|
||||||
unset($methods[$key]);
|
unset($methods[$key]);
|
||||||
@ -69,19 +69,8 @@ class PaymentNotification implements ShouldQueue
|
|||||||
NinjaMailerJob::dispatch($nmo);
|
NinjaMailerJob::dispatch($nmo);
|
||||||
}
|
}
|
||||||
|
|
||||||
// $notification = new NewPaymentNotification($payment, $payment->company);
|
|
||||||
// $notification->method = $methods;
|
|
||||||
|
|
||||||
// if ($user) {
|
|
||||||
// $user->notify($notification);
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Company Notifications*/
|
|
||||||
// if (isset($payment->company->slack_webhook_url)) {
|
|
||||||
// Notification::route('slack', $payment->company->slack_webhook_url)
|
|
||||||
// ->notify(new NewPaymentNotification($payment, $payment->company, true));
|
|
||||||
// }
|
|
||||||
|
|
||||||
/*Google Analytics Track Revenue*/
|
/*Google Analytics Track Revenue*/
|
||||||
if (isset($payment->company->google_analytics_key)) {
|
if (isset($payment->company->google_analytics_key)) {
|
||||||
|
@ -46,7 +46,8 @@ class SendVerificationNotification implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
public function handle($event)
|
public function handle($event)
|
||||||
{
|
{
|
||||||
|
nlog("In Send Verification Notification");
|
||||||
|
|
||||||
MultiDB::setDB($event->company->db);
|
MultiDB::setDB($event->company->db);
|
||||||
|
|
||||||
$event->user->service()->invite($event->company);
|
$event->user->service()->invite($event->company);
|
||||||
|
@ -88,6 +88,8 @@ class CreditService
|
|||||||
{
|
{
|
||||||
$this->credit = (new ApplyPayment($this->credit, $invoice, $amount, $payment))->run();
|
$this->credit = (new ApplyPayment($this->credit, $invoice, $amount, $payment))->run();
|
||||||
|
|
||||||
|
$this->deletePdf();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +44,7 @@ class MarkSent
|
|||||||
->setStatus(Credit::STATUS_SENT)
|
->setStatus(Credit::STATUS_SENT)
|
||||||
->applyNumber()
|
->applyNumber()
|
||||||
->adjustBalance($this->credit->amount)
|
->adjustBalance($this->credit->amount)
|
||||||
|
->deletePdf()
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@ class MarkSent
|
|||||||
->service()
|
->service()
|
||||||
->setStatus(Quote::STATUS_SENT)
|
->setStatus(Quote::STATUS_SENT)
|
||||||
->applyNumber()
|
->applyNumber()
|
||||||
|
->deletePdf()
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
return $this->quote;
|
return $this->quote;
|
||||||
|
@ -39,21 +39,6 @@ class QuoteService
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function markApproved()
|
|
||||||
// {
|
|
||||||
// $mark_approved = new MarkApproved($this->quote->client);
|
|
||||||
// $this->quote = $mark_approved->run($this->quote);
|
|
||||||
|
|
||||||
// if ($this->quote->client->getSetting('auto_convert_quote') == true) {
|
|
||||||
// $this->convert();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// $this->markSent()
|
|
||||||
// ->createInvitations();
|
|
||||||
|
|
||||||
// return $this;
|
|
||||||
// }
|
|
||||||
|
|
||||||
public function convert() :self
|
public function convert() :self
|
||||||
{
|
{
|
||||||
if ($this->quote->invoice_id) {
|
if ($this->quote->invoice_id) {
|
||||||
@ -127,6 +112,7 @@ class QuoteService
|
|||||||
->service()
|
->service()
|
||||||
->markSent()
|
->markSent()
|
||||||
->createInvitations()
|
->createInvitations()
|
||||||
|
->deletePdf()
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -65,7 +65,7 @@
|
|||||||
"predis/predis": "^1.1",
|
"predis/predis": "^1.1",
|
||||||
"sentry/sentry-laravel": "^2",
|
"sentry/sentry-laravel": "^2",
|
||||||
"stripe/stripe-php": "^7.50",
|
"stripe/stripe-php": "^7.50",
|
||||||
"turbo124/beacon": "^1",
|
"turbo124/beacon": "^1.0",
|
||||||
"webpatser/laravel-countries": "dev-master#75992ad",
|
"webpatser/laravel-countries": "dev-master#75992ad",
|
||||||
"wildbit/swiftmailer-postmark": "^3.3"
|
"wildbit/swiftmailer-postmark": "^3.3"
|
||||||
},
|
},
|
||||||
|
713
composer.lock
generated
713
composer.lock
generated
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@ return [
|
|||||||
'require_https' => env('REQUIRE_HTTPS', true),
|
'require_https' => env('REQUIRE_HTTPS', true),
|
||||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||||
'app_domain' => env('APP_DOMAIN', ''),
|
'app_domain' => env('APP_DOMAIN', ''),
|
||||||
'app_version' => '5.1.18',
|
'app_version' => '5.1.19',
|
||||||
'minimum_client_version' => '5.0.16',
|
'minimum_client_version' => '5.0.16',
|
||||||
'terms_version' => '1.0.1',
|
'terms_version' => '1.0.1',
|
||||||
'api_secret' => env('API_SECRET', false),
|
'api_secret' => env('API_SECRET', false),
|
||||||
|
2
public/flutter_service_worker.js
vendored
2
public/flutter_service_worker.js
vendored
@ -30,7 +30,7 @@ const RESOURCES = {
|
|||||||
"assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "3e722fd57a6db80ee119f0e2c230ccff",
|
"assets/packages/material_design_icons_flutter/lib/fonts/materialdesignicons-webfont.ttf": "3e722fd57a6db80ee119f0e2c230ccff",
|
||||||
"assets/FontManifest.json": "cf3c681641169319e61b61bd0277378f",
|
"assets/FontManifest.json": "cf3c681641169319e61b61bd0277378f",
|
||||||
"/": "23224b5e03519aaa87594403d54412cf",
|
"/": "23224b5e03519aaa87594403d54412cf",
|
||||||
"main.dart.js": "b47a232664791053223138fe8bf8322c",
|
"main.dart.js": "4f262274e979ed7c414d394fc5f0baea",
|
||||||
"version.json": "b7c8971e1ab5b627fd2a4317c52b843e",
|
"version.json": "b7c8971e1ab5b627fd2a4317c52b843e",
|
||||||
"favicon.png": "dca91c54388f52eded692718d5a98b8b"
|
"favicon.png": "dca91c54388f52eded692718d5a98b8b"
|
||||||
};
|
};
|
||||||
|
31301
public/main.dart.js
vendored
31301
public/main.dart.js
vendored
File diff suppressed because one or more lines are too long
@ -165,6 +165,7 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
|
|||||||
|
|
||||||
Route::post('users/bulk', 'UserController@bulk')->name('users.bulk')->middleware('password_protected');
|
Route::post('users/bulk', 'UserController@bulk')->name('users.bulk')->middleware('password_protected');
|
||||||
Route::post('/users/{user}/invite', 'UserController@invite')->middleware('password_protected');
|
Route::post('/users/{user}/invite', 'UserController@invite')->middleware('password_protected');
|
||||||
|
Route::post('/user/{user}/reconfirm', 'UserController@reconfirm');
|
||||||
|
|
||||||
Route::resource('webhooks', 'WebhookController');
|
Route::resource('webhooks', 'WebhookController');
|
||||||
Route::post('webhooks/bulk', 'WebhookController@bulk')->name('webhooks.bulk');
|
Route::post('webhooks/bulk', 'WebhookController@bulk')->name('webhooks.bulk');
|
||||||
|
Loading…
Reference in New Issue
Block a user