mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-12 14:12:44 +01:00
Updates for app domain and app urls
This commit is contained in:
parent
9ec383ce93
commit
074634ea5c
@ -85,7 +85,7 @@ class BackupUpdate extends Command
|
||||
->each(function ($company) {
|
||||
$company_logo_path = $company->settings->company_logo;
|
||||
|
||||
if ($company_logo_path == 'https://invoicing.co/images/new_logo.png' || $company_logo_path == '') {
|
||||
if ($company_logo_path == config('ninja.app_logo') || $company_logo_path == '') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -977,7 +977,7 @@ class CheckData extends Command
|
||||
$cc = ClientContact::on('db-ninja-01')->where('company_id', config('ninja.ninja_default_company_id'))->where('email', $cu->user->email)->first();
|
||||
|
||||
if ($cc) {
|
||||
$ninja_portal_url = "https://invoiceninja.invoicing.co/client/ninja/{$cc->contact_key}/{$cu->account->key}";
|
||||
$ninja_portal_url = config('ninja.ninja_client_portal')."/client/ninja/{$cc->contact_key}/{$cu->account->key}";
|
||||
|
||||
$cu->ninja_portal_url = $ninja_portal_url;
|
||||
$cu->save();
|
||||
@ -990,7 +990,7 @@ class CheckData extends Command
|
||||
$cc = $c->contacts()->first();
|
||||
|
||||
if ($cc) {
|
||||
$ninja_portal_url = "https://invoiceninja.invoicing.co/client/ninja/{$cc->contact_key}/{$cu->account->key}";
|
||||
$ninja_portal_url = config('ninja.ninja_client_portal')."/client/ninja/{$cc->contact_key}/{$cu->account->key}";
|
||||
|
||||
$cu->ninja_portal_url = $ninja_portal_url;
|
||||
$cu->save();
|
||||
|
@ -55,7 +55,7 @@ class ContactLoginController extends Controller
|
||||
/** @var \App\Models\Company $company **/
|
||||
if ($company) {
|
||||
$account = $company->account;
|
||||
} elseif (! $company && strpos($request->getHost(), 'invoicing.co') !== false) {
|
||||
} elseif (! $company && strpos($request->getHost(), config('ninja.app_domain')) !== false) {
|
||||
$subdomain = explode('.', $request->getHost())[0];
|
||||
MultiDB::findAndSetDbByDomain(['subdomain' => $subdomain]);
|
||||
$company = Company::where('subdomain', $subdomain)->first();
|
||||
|
@ -51,7 +51,7 @@ class YodleeController extends BaseController
|
||||
$this->getAccounts($company, $token);
|
||||
}
|
||||
|
||||
$redirect_url = isset($request->getTokenContent()['is_react']) && $request->getTokenContent()['is_react'] ? 'https://app.invoicing.co/#/' : 'https://invoicing.co/';
|
||||
$redirect_url = isset($request->getTokenContent()['is_react']) && $request->getTokenContent()['is_react'] ? config('ninja.react_url') : config('ninja.app_url');
|
||||
|
||||
$data = [
|
||||
'access_token' => $yodlee->getAccessToken(),
|
||||
|
@ -530,8 +530,8 @@ class BaseController extends Controller
|
||||
|
||||
$paginator = $query->paginate($limit);
|
||||
|
||||
/** @phpstan-ignore-next-line **/
|
||||
$query = $paginator->getCollection();
|
||||
/** @phpstan-ignore-next-line */
|
||||
$query = $paginator->getCollection(); // @phpstan-ignore-line
|
||||
|
||||
$resource = new Collection($query, $transformer, $this->entity_type);
|
||||
|
||||
@ -636,7 +636,8 @@ class BaseController extends Controller
|
||||
$paginator = $query->paginate($limit);
|
||||
|
||||
/** @phpstan-ignore-next-line **/
|
||||
$query = $paginator->getCollection();
|
||||
$query = $paginator->getCollection();// @phpstan-ignore-line
|
||||
|
||||
$resource = new Collection($query, $transformer, $this->entity_type);
|
||||
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
||||
}
|
||||
@ -885,7 +886,8 @@ class BaseController extends Controller
|
||||
$paginator = $query->paginate($limit);
|
||||
|
||||
/** @phpstan-ignore-next-line **/
|
||||
$query = $paginator->getCollection();
|
||||
$query = $paginator->getCollection();// @phpstan-ignore-line
|
||||
|
||||
|
||||
$resource = new Collection($query, $transformer, $this->entity_type);
|
||||
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
||||
@ -951,7 +953,8 @@ class BaseController extends Controller
|
||||
if ($query instanceof Builder) {
|
||||
$limit = $this->resolveQueryLimit();
|
||||
$paginator = $query->paginate($limit);
|
||||
$query = $paginator->getCollection();
|
||||
$query = $paginator->getCollection();// @phpstan-ignore-line
|
||||
|
||||
$resource = new Collection($query, $transformer, $this->entity_type);
|
||||
$resource->setPaginator(new IlluminatePaginatorAdapter($paginator));
|
||||
}
|
||||
@ -1092,8 +1095,8 @@ class BaseController extends Controller
|
||||
/** @var \App\Models\Account $account */
|
||||
|
||||
//always redirect invoicing.co to invoicing.co
|
||||
if (Ninja::isHosted() && !in_array(request()->getSchemeAndHttpHost(), ['https://staging.invoicing.co', 'https://invoicing.co', 'https://demo.invoicing.co', 'https://invoiceninja.net'])) {
|
||||
return redirect()->secure('https://invoicing.co');
|
||||
if (Ninja::isHosted() && !in_array(request()->getSchemeAndHttpHost(), ['https://staging.invoicing.co', 'https://invoicing.co', 'https://demo.invoicing.co', 'https://invoiceninja.net', config('ninja.app_url')])) {
|
||||
return redirect()->secure(config('ninja.app_url'));
|
||||
}
|
||||
|
||||
if (config('ninja.require_https') && ! request()->isSecure()) {
|
||||
|
@ -44,7 +44,7 @@ class ApplePayDomainController extends Controller
|
||||
|
||||
$domain_name = $request->getHost();
|
||||
|
||||
if (strpos($domain_name, 'invoicing.co') !== false) {
|
||||
if (strpos($domain_name, config('ninja.app_domain')) !== false) {
|
||||
$subdomain = explode('.', $domain_name)[0];
|
||||
|
||||
$query = [
|
||||
|
@ -53,10 +53,6 @@ class PreviewController extends BaseController
|
||||
public function live(PreviewInvoiceRequest $request): mixed
|
||||
{
|
||||
|
||||
if (Ninja::isHosted() && !in_array($request->getHost(), ['preview.invoicing.co','staging.invoicing.co'])) {
|
||||
return response()->json(['message' => 'This server cannot handle this request.'], 400);
|
||||
}
|
||||
|
||||
$start = microtime(true);
|
||||
|
||||
/** Build models */
|
||||
|
@ -51,7 +51,7 @@ class StripeConnectController extends BaseController
|
||||
}
|
||||
|
||||
$stripe_client_id = config('ninja.ninja_stripe_client_id');
|
||||
$redirect_uri = 'https://invoicing.co/stripe/completed';
|
||||
$redirect_uri = config('ninja.app_url').'/stripe/completed';
|
||||
$endpoint = "https://connect.stripe.com/oauth/authorize?response_type=code&client_id={$stripe_client_id}&redirect_uri={$redirect_uri}&scope=read_write&state={$token}";
|
||||
|
||||
return redirect($endpoint);
|
||||
@ -139,9 +139,9 @@ class StripeConnectController extends BaseController
|
||||
|
||||
// StripeWebhook::dispatch($company->company_key, $company_gateway->id);
|
||||
if(isset($request->getTokenContent()['is_react']) && $request->getTokenContent()['is_react']) {
|
||||
$redirect_uri = 'https://app.invoicing.co/#/settings/online_payments';
|
||||
$redirect_uri = config('ninja.react_url').'/#/settings/online_payments';
|
||||
} else {
|
||||
$redirect_uri = 'https://invoicing.co/stripe/completed';
|
||||
$redirect_uri = config('ninja.app_url').'/stripe/completed';
|
||||
}
|
||||
|
||||
//response here
|
||||
|
@ -22,7 +22,7 @@ class ContactRegister
|
||||
$domain_name = $request->getHost();
|
||||
|
||||
/* Hosted */
|
||||
if (strpos($domain_name, 'invoicing.co') !== false) {
|
||||
if (strpos($domain_name, config('ninja.app_domain')) !== false) {
|
||||
$subdomain = explode('.', $domain_name)[0];
|
||||
|
||||
$query = [
|
||||
|
@ -32,8 +32,7 @@ class SessionDomains
|
||||
|
||||
$domain_name = $request->getHost();
|
||||
|
||||
if (strpos($domain_name, 'invoicing.co') !== false) {
|
||||
// config(['session.domain' => '.invoicing.co']);
|
||||
if (strpos($domain_name, config('ninja.app_domain')) !== false) {
|
||||
} else {
|
||||
config(['session.domain' => $domain_name]);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ class SetDomainNameDb
|
||||
|
||||
$domain_name = $request->getHost();
|
||||
|
||||
if (strpos($domain_name, 'invoicing.co') !== false) {
|
||||
if (strpos($domain_name, config('ninja.app_domain')) !== false) {
|
||||
$subdomain = explode('.', $domain_name)[0];
|
||||
|
||||
$query = [
|
||||
|
@ -39,7 +39,7 @@ class StripeConnectFailed extends Mailable
|
||||
{
|
||||
return new Envelope(
|
||||
subject: "Stripe Connect not configured, please login and connect.",
|
||||
from: "maildelivery@invoicing.co",
|
||||
from: config('ninja.contact.email'),
|
||||
to: $this->user->email,
|
||||
);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ class PdfMock
|
||||
'$client.billing_address2' => '63993 Aiyana View',
|
||||
'$client.billing_address1' => '8447',
|
||||
'$client.shipping_country' => 'USA',
|
||||
'$invoiceninja.whitelabel' => 'https://invoicing.co/images/new_logo.png',
|
||||
'$invoiceninja.whitelabel' => config('ninja.app_logo'),
|
||||
'$client.billing_address' => '8447<br/>63993 Aiyana View<br/>Aufderharchester, North Carolina 11243<br/>United States<br/>',
|
||||
'$client.billing_country' => 'USA',
|
||||
'$task.gross_line_total' => '100',
|
||||
@ -837,7 +837,7 @@ class PdfMock
|
||||
'$purchase_order.due_date' => '02-12-2021',
|
||||
'$vendor.billing_address1' => '589',
|
||||
'$vendor.billing_address2' => '761 Odessa Centers Suite 673',
|
||||
'$invoiceninja.whitelabel' => 'https://invoicing.co/images/new_logo.png',
|
||||
'$invoiceninja.whitelabel' => config('ninja.app_logo'),
|
||||
'$purchase_order.custom1' => 'Custom 1',
|
||||
'$purchase_order.custom2' => 'Custom 2',
|
||||
'$purchase_order.custom3' => 'Custom 3',
|
||||
@ -913,7 +913,7 @@ class PdfMock
|
||||
'$created_by_user' => 'Mr. Louvenia Armstrong Prof. Reyes Anderson',
|
||||
'$vendor.currency' => 'USD',
|
||||
'$company.country' => 'United States',
|
||||
'$tech_hero_image' => 'https://invoicing.co/images/pdf-designs/tech-hero-image.jpg',
|
||||
'$tech_hero_image' => config('ninja.app_url').'/images/pdf-designs/tech-hero-image.jpg',
|
||||
'$company.website' => 'http://www.dare.com/vero-consequatur-eveniet-dolorum-exercitationem-alias-repellat.html',
|
||||
'$gross_subtotal' => '$10,256.40',
|
||||
'$emailSignature' => ' ',
|
||||
|
@ -11,6 +11,8 @@ return [
|
||||
'version_url' => 'https://pdf.invoicing.co/api/version',
|
||||
'app_name' => env('APP_NAME', 'Invoice Ninja'),
|
||||
'app_env' => env('APP_ENV', 'selfhosted'),
|
||||
'app_logo' => env('APP_LOGO', 'https://invoicing.co/images/new_logo.png'),
|
||||
'ninja_client_portal' => env('NINJA_CLIENT_PORTAL', 'https://invoiceninja.invoicing.co'),
|
||||
'debug_enabled' => env('APP_DEBUG', false),
|
||||
'require_https' => env('REQUIRE_HTTPS', true),
|
||||
'app_url' => rtrim(env('APP_URL', ''), '/'),
|
||||
|
@ -4260,7 +4260,7 @@ $LANG = array(
|
||||
'direct_debit' => 'Direct Debit',
|
||||
'clone_to_expense' => 'Clone to Expense',
|
||||
'checkout' => 'Checkout',
|
||||
'acss' => 'Pre-authorized debit payments',
|
||||
'acss' => 'ACSS Debit',
|
||||
'invalid_amount' => 'Invalid amount. Number/Decimal values only.',
|
||||
'client_payment_failure_body' => 'Payment for Invoice :invoice for amount :amount failed.',
|
||||
'browser_pay' => 'Google Pay, Apple Pay, Microsoft Pay',
|
||||
|
@ -958,7 +958,7 @@ $LANG = array(
|
||||
'header_font_id' => 'Police de l\'en-tête',
|
||||
'body_font_id' => 'Police du corps',
|
||||
'color_font_help' => 'Note: la couleur principale et les polices sont aussi utilisées dans le portail client et dans les modèles de courriels personnalisés.',
|
||||
'live_preview' => 'PRÉVISUALISATION',
|
||||
'live_preview' => 'Prévisualitsation',
|
||||
'invalid_mail_config' => 'impossible d\'envoyer le courriel, veuillez vérifier vos paramètres courriel.',
|
||||
'invoice_message_button' => 'Pour voir la facture de :amount, cliquez sur le bouton ci-dessous.',
|
||||
'quote_message_button' => 'Pour voir la soumission de :amount, cliquez sur le bouton ci-dessous.',
|
||||
@ -1183,7 +1183,7 @@ $LANG = array(
|
||||
'page_size' => 'Taille de page',
|
||||
'live_preview_disabled' => 'La prévisualisation en direct a été désactivée pour cette police',
|
||||
'invoice_number_padding' => 'Remplissage (padding)',
|
||||
'preview' => 'PRÉVISUALISATION',
|
||||
'preview' => 'Prévisualitsation',
|
||||
'list_vendors' => 'Liste des fournisseurs',
|
||||
'add_users_not_supported' => 'Mettre à niveau vers le plan Enterprise plan pour ajouter des utilisateurs à votre compte.',
|
||||
'enterprise_plan_features' => 'Le Plan entreprise offre le support pour de multiple utilisateurs ainsi que l\'ajout de pièces jointes, :link pour voir la liste complète des fonctionnalités.',
|
||||
@ -5181,6 +5181,30 @@ Lorsque les montant apparaîtront sur votre relevé, veuillez revenir sur cette
|
||||
'payment_receipt' => 'Reçu de paiement #',
|
||||
'load_template_description' => 'Le modèle s\'appliquera à:',
|
||||
'run_template' => 'Exécuter le modèle',
|
||||
'statement_design' => 'Modèle de relevé',
|
||||
'delivery_note_design' => 'Modèle de note de livraison',
|
||||
'payment_receipt_design' => 'Modèle de reçu de paiement',
|
||||
'payment_refund_design' => 'Modèle de paiement de remboursement',
|
||||
'task_extension_banner' => 'Ajouter l\'extension Chrome pour gérer vos tâches',
|
||||
'watch_video' => 'Regardez',
|
||||
'view_extension' => 'Voir l\'extension',
|
||||
'reactivate_email' => 'Réactiver le courriel',
|
||||
'email_reactivated' => 'Le courriel a été réactivé',
|
||||
'template_help' => 'Enable using the design as a template',
|
||||
'quarter' => 'Quarter',
|
||||
'item_description' => 'Description d\'article',
|
||||
'task_item' => 'Article de tâche',
|
||||
'record_state' => 'État de l\'enregistrement',
|
||||
'save_files_to_this_folder' => 'Sauvegarder les fichiers dans ce dossier',
|
||||
'downloads_folder' => 'Dossier de téléchargements',
|
||||
'total_invoiced_quotes' => 'Soumissions facturées',
|
||||
'total_invoice_paid_quotes' => 'Soumissions de factures payées',
|
||||
'downloads_folder_does_not_exist' => 'Le dossier de téléchargements n\'existe pas :value',
|
||||
'user_logged_in_notification' => 'User Logged in Notification',
|
||||
'user_logged_in_notification_help' => 'Send an email when logging in from a new location',
|
||||
'payment_email_all_contacts' => 'Courriel de paiement à tous les contacts',
|
||||
'payment_email_all_contacts_help' => 'Envoi un courriel de paiement à tous les contacts lorsqu\'activé',
|
||||
'add_line' => 'Ajouter une ligne',
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
@ -64,7 +64,7 @@ $LANG = array(
|
||||
'archive_invoice' => 'Archiver la facture',
|
||||
'delete_invoice' => 'Supprimer la facture',
|
||||
'email_invoice' => 'Envoyer la facture par courriel',
|
||||
'enter_payment' => 'Inscrire un paiement',
|
||||
'enter_payment' => 'Saisir un paiement',
|
||||
'tax_rates' => 'Taux de TVA',
|
||||
'rate' => 'Taux',
|
||||
'settings' => 'Paramètres',
|
||||
@ -125,8 +125,8 @@ $LANG = array(
|
||||
'filter' => 'Filtrer',
|
||||
'new_client' => 'Nouveau client',
|
||||
'new_invoice' => 'Nouvelle facture',
|
||||
'new_payment' => 'Inscrire un paiement',
|
||||
'new_credit' => 'Inscrire un crédit',
|
||||
'new_payment' => 'Saisir un paiement',
|
||||
'new_credit' => 'Saisir un crédit',
|
||||
'contact' => 'Contact',
|
||||
'date_created' => 'Date de création',
|
||||
'last_login' => 'Dernière connexion',
|
||||
@ -150,7 +150,7 @@ $LANG = array(
|
||||
'edit_client' => 'Modifier le client',
|
||||
'edit_invoice' => 'Modifier la facture',
|
||||
'create_invoice' => 'Créer une facture',
|
||||
'enter_credit' => 'Inscrire un crédit',
|
||||
'enter_credit' => 'Saisir un crédit',
|
||||
'last_logged_in' => 'Dernière connexion',
|
||||
'details' => 'Détails',
|
||||
'standing' => 'En attente',
|
||||
@ -387,7 +387,7 @@ $LANG = array(
|
||||
'more_designs_self_host_text' => '',
|
||||
'buy' => 'Acheter',
|
||||
'bought_designs' => 'Les nouveaux modèles ont été ajoutés avec succès',
|
||||
'sent' => 'Envoyé',
|
||||
'sent' => 'Envoyée',
|
||||
'vat_number' => 'N° de taxe',
|
||||
'timesheets' => 'Feuilles de temps',
|
||||
'payment_title' => 'Veuillez entrer votre adresse de facturation et vos information de carte de crédit',
|
||||
@ -5181,6 +5181,30 @@ Lorsque les montant apparaîtront sur votre relevé, veuillez revenir sur cette
|
||||
'payment_receipt' => 'Reçu de paiement # :number',
|
||||
'load_template_description' => 'Le modèle sera appliqué aux éléments suivants :',
|
||||
'run_template' => 'Exécuter le modèle',
|
||||
'statement_design' => 'Modèle de relevé',
|
||||
'delivery_note_design' => 'Delivery Note Design',
|
||||
'payment_receipt_design' => 'Modèle de reçu de paiement',
|
||||
'payment_refund_design' => 'Payment Refund Design',
|
||||
'task_extension_banner' => 'Add the Chrome extension to manage your tasks',
|
||||
'watch_video' => 'Regardez la vidéo',
|
||||
'view_extension' => 'Voir l\'extension',
|
||||
'reactivate_email' => 'Réactiver l\'adresse email',
|
||||
'email_reactivated' => 'L\'adresse email a été réactivée',
|
||||
'template_help' => 'Enable using the design as a template',
|
||||
'quarter' => 'Quarter',
|
||||
'item_description' => 'Description d\'article',
|
||||
'task_item' => 'Task Item',
|
||||
'record_state' => 'Record State',
|
||||
'save_files_to_this_folder' => 'Sauvegarder les fichiers dans ce dossier',
|
||||
'downloads_folder' => 'Dossier de téléchargements',
|
||||
'total_invoiced_quotes' => 'Offres facturées',
|
||||
'total_invoice_paid_quotes' => 'Offres de factures payées',
|
||||
'downloads_folder_does_not_exist' => 'Le dossier de téléchargements n\'existe pas :value',
|
||||
'user_logged_in_notification' => 'Notification de connexion d\'utilisateur',
|
||||
'user_logged_in_notification_help' => 'Send an email when logging in from a new location',
|
||||
'payment_email_all_contacts' => 'Email de paiement à tous les contacts',
|
||||
'payment_email_all_contacts_help' => 'Sends the payment email to all contacts when enabled',
|
||||
'add_line' => 'Ajouter une ligne',
|
||||
);
|
||||
|
||||
return $LANG;
|
||||
|
Loading…
Reference in New Issue
Block a user