mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Merge branch 'v2' of https://github.com/invoiceninja/invoiceninja into v2
This commit is contained in:
commit
b92b7cbe63
15
README.md
15
README.md
@ -6,11 +6,11 @@
|
||||
[](https://codecov.io/gh/invoiceninja/invoiceninja)
|
||||
[](https://www.codacy.com/app/turbo124/invoiceninja?utm_source=github.com&utm_medium=referral&utm_content=invoiceninja/invoiceninja&utm_campaign=Badge_Grade)
|
||||
|
||||
**Invoice Ninja v 2** is coming soon!
|
||||
# Invoice Ninja version 2.0 is coming!
|
||||
|
||||
We will be using the lessons learnt in Invoice Ninja 4.0 to build a bigger better platform to work from. If you would like to contribute to the project we will gladly accept contributions for code, user guides, bug tracking and feedback! Please consider the following guidelines prior to submitting a pull request:
|
||||
|
||||
# Contribution guide.
|
||||
## Contribution guide.
|
||||
|
||||
Code Style to follow [PSR-2](https://www.php-fig.org/psr/psr-2/) standards.
|
||||
|
||||
@ -26,9 +26,14 @@ PHP >= 7.3 allows the return type Nullable so there should be no circumstance a
|
||||
|
||||
`public function doThat() ?:string`
|
||||
|
||||
To improve chances of PRs being merged please include teststo ensure your code works well and integrates with the rest of the project.
|
||||
To improve chances of PRs being merged please include tests to ensure your code works well and integrates with the rest of the project.
|
||||
|
||||
|
||||
# Documentation
|
||||
## Documentation
|
||||
|
||||
API documentation is hosted using Swagger and can be found [HERE](https://app.swaggerhub.com/apis-docs/InvoiceNinja/InvoiceNinjaV2/1.0.3)
|
||||
|
||||
## Current work in progress
|
||||
|
||||
Invoice Ninja is currently being written in a combination of Laravel for the API and Client Portal and Flutter for the front end management console. This will allow an immersive and consistent experience across any device: mobile, tablet or desktop.
|
||||
|
||||
To manage our workflow we will be creating separate branches for the client (Flutter) and server (Laravel API / Client Portal) and merge these into a release branch for deployments.
|
||||
|
@ -70,19 +70,6 @@ class ProfileController extends Controller
|
||||
if($request->input('password'))
|
||||
$client_contact->password = Hash::make($request->input('password'));
|
||||
|
||||
//update avatar if needed
|
||||
if($request->file('avatar'))
|
||||
{
|
||||
$path = UploadAvatar::dispatchNow($request->file('avatar'), auth()->user()->client->client_hash);
|
||||
|
||||
if($path)
|
||||
{
|
||||
$client_contact->avatar = $path;
|
||||
$client_contact->avatar_size = $request->file('avatar')->getSize();
|
||||
$client_contact->avatar_type = $request->file('avatar')->getClientOriginalExtension();
|
||||
}
|
||||
}
|
||||
|
||||
$client_contact->save();
|
||||
|
||||
// auth()->user()->fresh();
|
||||
@ -95,6 +82,16 @@ class ProfileController extends Controller
|
||||
|
||||
$client = $client_contact->client;
|
||||
|
||||
//update avatar if needed
|
||||
if($request->file('logo'))
|
||||
{
|
||||
$path = UploadAvatar::dispatchNow($request->file('logo'), auth()->user()->client->client_hash);
|
||||
|
||||
if($path)
|
||||
$client->logo = $path;
|
||||
|
||||
}
|
||||
|
||||
$client->fill($request->all());
|
||||
$client->save();
|
||||
|
||||
|
@ -33,7 +33,8 @@ class UpdateClientRequest extends Request
|
||||
{
|
||||
|
||||
return [
|
||||
'name' => 'required'
|
||||
'name' => 'required',
|
||||
'file' => 'sometimes|nullable|max:100000|mimes:png,svg,jpeg,gif,jpg,bmp'
|
||||
];
|
||||
|
||||
}
|
||||
|
@ -38,7 +38,6 @@ class UpdateContactRequest extends Request
|
||||
'last_name' => 'required',
|
||||
'email' => 'required|email|unique:client_contacts,email,' . auth()->user()->id,
|
||||
'password' => 'sometimes|nullable|min:6|confirmed',
|
||||
'file' => 'sometimes|nullable|max:100000|mimes:png,svg,jpeg,gif,jpg,bmp'
|
||||
];
|
||||
|
||||
}
|
||||
|
@ -27,9 +27,6 @@ use App\Utils\Traits\MakesHash;
|
||||
class AccountTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
/**
|
||||
* @SWG\Property(property="account_key", type="string", example="123456")
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var array
|
||||
|
@ -16,8 +16,6 @@ use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* Class ContactTransformer.
|
||||
*
|
||||
* @SWG\Definition(definition="ClientContact", @SWG\Xml(name="ClientContact"))
|
||||
*/
|
||||
class ClientContactLoginTransformer extends EntityTransformer
|
||||
{
|
||||
|
@ -17,7 +17,6 @@ use App\Utils\Traits\MakesHash;
|
||||
/**
|
||||
* Class ContactTransformer.
|
||||
*
|
||||
* @SWG\Definition(definition="ClientContact", @SWG\Xml(name="ClientContact"))
|
||||
*/
|
||||
class ClientContactTransformer extends EntityTransformer
|
||||
{
|
||||
|
@ -16,14 +16,12 @@ use App\Models\ClientContact;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="Client", @SWG\Xml(name="Client"))
|
||||
* class ClientTransformer
|
||||
*/
|
||||
class ClientTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
/**
|
||||
* @SWG\Property(property="id", type="integer", example=1, readOnly=true)
|
||||
*/
|
||||
|
||||
protected $defaultIncludes = [
|
||||
'contacts',
|
||||
];
|
||||
|
@ -27,10 +27,6 @@ class CompanyTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Property(property="account_key", type="string", example="123456")
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
@ -77,8 +73,6 @@ class CompanyTransformer extends EntityTransformer
|
||||
'work_phone' => $company->work_phone,
|
||||
'work_email' => $company->work_email,
|
||||
'country_id' => (int) $company->country_id,
|
||||
'domain' => $company->domain,
|
||||
'db' => $company->db,
|
||||
'vat_number' => $company->vat_number,
|
||||
'id_number' => $company->id_number,
|
||||
'size_id' => (int) $company->size_id,
|
||||
|
@ -17,9 +17,6 @@ use App\Models\CompanyUser;
|
||||
use App\Models\User;
|
||||
use App\Transformers\CompanyTokenTransformer;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="CompanyUser", @SWG\Xml(name="CompanyUser"))
|
||||
*/
|
||||
class CompanyUserTransformer extends EntityTransformer
|
||||
{
|
||||
|
||||
|
@ -15,9 +15,6 @@ use App\Models\Invoice;
|
||||
use App\Transformers\EntityTransformer;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice"))
|
||||
*/
|
||||
class InvoiceTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
|
@ -15,9 +15,6 @@ use App\Models\Invoice;
|
||||
use App\Models\InvoiceInvitation;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice"))
|
||||
*/
|
||||
class InvoiceInvitationTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
|
@ -13,23 +13,7 @@ namespace App\Transformers;
|
||||
|
||||
class InvoiceItemTransformer extends EntityTransformer
|
||||
{
|
||||
/**
|
||||
* @SWG\Property(property="id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="product_key", type="string", example="Item")
|
||||
* @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="notes", type="string", example="Notes")
|
||||
* @SWG\Property(property="cost", type="number", format="float", example=10.00)
|
||||
* @SWG\Property(property="qty", type="number", format="float", example=1)
|
||||
* @SWG\Property(property="tax_name1", type="string", example="VAT")
|
||||
* @SWG\Property(property="tax_name2", type="string", example="Upkeep")
|
||||
* @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5")
|
||||
* @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0")
|
||||
* @SWG\Property(property="invoice_item_type_id", type="integer", example=1)
|
||||
* @SWG\Property(property="custom_value1", type="string", example="Value")
|
||||
* @SWG\Property(property="custom_value2", type="string", example="Value")
|
||||
* @SWG\Property(property="discount", type="number", format="float", example=10)
|
||||
*/
|
||||
|
||||
public function transform($item)
|
||||
{
|
||||
return [
|
||||
|
@ -14,58 +14,10 @@ namespace App\Transformers;
|
||||
use App\Models\Invoice;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice"))
|
||||
*/
|
||||
class InvoiceTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
/**
|
||||
* @SWG\Property(property="id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
|
||||
* @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true)
|
||||
* @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="client_id", type="integer", example=1)
|
||||
* @SWG\Property(property="status_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="invoice_number", type="string", example="0001")
|
||||
* @SWG\Property(property="discount", type="number", format="float", example=10)
|
||||
* @SWG\Property(property="po_number", type="string", example="0001")
|
||||
* @SWG\Property(property="invoice_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="terms", type="string", example="sample")
|
||||
* @SWG\Property(property="private_notes", type="string", example="Notes")
|
||||
* @SWG\Property(property="public_notes", type="string", example="Notes")
|
||||
* @SWG\Property(property="invoice_type_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="is_recurring", type="boolean", example=false)
|
||||
* @SWG\Property(property="frequency_id", type="integer", example=1)
|
||||
* @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true)
|
||||
* @SWG\Property(property="recurring_invoice_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="tax_name1", type="string", example="VAT")
|
||||
* @SWG\Property(property="tax_name2", type="string", example="Upkeep")
|
||||
* @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5")
|
||||
* @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0")
|
||||
* @SWG\Property(property="is_amount_discount", type="boolean", example=false)
|
||||
* @SWG\Property(property="invoice_footer", type="string", example="Footer")
|
||||
* @SWG\Property(property="partial", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="auto_bill", type="boolean", example=false)
|
||||
* @SWG\Property(property="custom_value1", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="custom_value2", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="custom_taxes1", type="boolean", example=false)
|
||||
* @SWG\Property(property="custom_taxes2", type="boolean", example=false)
|
||||
* @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="quote_invoice_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value")
|
||||
* @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value")
|
||||
* @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="is_public", type="boolean", example=false)
|
||||
* @SWG\Property(property="filename", type="string", example="Filename", readOnly=true)
|
||||
*/
|
||||
|
||||
protected $defaultIncludes = [
|
||||
// 'invoice_items',
|
||||
];
|
||||
|
@ -17,27 +17,10 @@ use App\Models\Invoice;
|
||||
use App\Models\Payment;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="Payment", required={"invoice_id"}, @SWG\Xml(name="Payment"))
|
||||
*/
|
||||
class PaymentTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
/**
|
||||
* @SWG\Property(property="id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
|
||||
* @SWG\Property(property="transaction_reference", type="string", example="Transaction Reference")
|
||||
* @SWG\Property(property="payment_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="invoice_id", type="integer", example=1)
|
||||
* @SWG\Property(property="invoice_number", type="string", example="Invoice Number")
|
||||
* @SWG\Property(property="private_notes", type="string", example="Notes")
|
||||
* @SWG\Property(property="exchange_rate", type="number", format="float", example=10)
|
||||
* @SWG\Property(property="exchange_currency_id", type="integer", example=1)
|
||||
*/
|
||||
|
||||
|
||||
protected $serializer;
|
||||
|
||||
protected $defaultIncludes = [];
|
||||
|
@ -16,9 +16,6 @@ use App\Models\Product;
|
||||
use App\Models\User;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="Product", @SWG\Xml(name="Product"))
|
||||
*/
|
||||
class ProductTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
|
@ -14,58 +14,10 @@ namespace App\Transformers;
|
||||
use App\Models\Quote;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="quote", required={"quote_number"}, @SWG\Xml(name="quote"))
|
||||
*/
|
||||
class QuoteTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
/**
|
||||
* @SWG\Property(property="id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
|
||||
* @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true)
|
||||
* @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="client_id", type="integer", example=1)
|
||||
* @SWG\Property(property="status_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="quote_number", type="string", example="0001")
|
||||
* @SWG\Property(property="discount", type="number", format="float", example=10)
|
||||
* @SWG\Property(property="po_number", type="string", example="0001")
|
||||
* @SWG\Property(property="quote_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="terms", type="string", example="sample")
|
||||
* @SWG\Property(property="private_notes", type="string", example="Notes")
|
||||
* @SWG\Property(property="public_notes", type="string", example="Notes")
|
||||
* @SWG\Property(property="quote_type_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="is_recurring", type="boolean", example=false)
|
||||
* @SWG\Property(property="frequency_id", type="integer", example=1)
|
||||
* @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true)
|
||||
* @SWG\Property(property="recurring_quote_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="tax_name1", type="string", example="VAT")
|
||||
* @SWG\Property(property="tax_name2", type="string", example="Upkeep")
|
||||
* @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5")
|
||||
* @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0")
|
||||
* @SWG\Property(property="is_amount_discount", type="boolean", example=false)
|
||||
* @SWG\Property(property="quote_footer", type="string", example="Footer")
|
||||
* @SWG\Property(property="partial", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="auto_bill", type="boolean", example=false)
|
||||
* @SWG\Property(property="custom_value1", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="custom_value2", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="custom_taxes1", type="boolean", example=false)
|
||||
* @SWG\Property(property="custom_taxes2", type="boolean", example=false)
|
||||
* @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="quote_quote_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value")
|
||||
* @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value")
|
||||
* @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="is_public", type="boolean", example=false)
|
||||
* @SWG\Property(property="filename", type="string", example="Filename", readOnly=true)
|
||||
*/
|
||||
|
||||
protected $defaultIncludes = [
|
||||
// 'quote_items',
|
||||
];
|
||||
|
@ -15,58 +15,10 @@ use App\Models\Invoice;
|
||||
use App\Models\RecurringInvoice;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice"))
|
||||
*/
|
||||
class RecurringInvoiceTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
/**
|
||||
* @SWG\Property(property="id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
|
||||
* @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true)
|
||||
* @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="client_id", type="integer", example=1)
|
||||
* @SWG\Property(property="status_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="invoice_number", type="string", example="0001")
|
||||
* @SWG\Property(property="discount", type="number", format="float", example=10)
|
||||
* @SWG\Property(property="po_number", type="string", example="0001")
|
||||
* @SWG\Property(property="invoice_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="terms", type="string", example="sample")
|
||||
* @SWG\Property(property="private_notes", type="string", example="Notes")
|
||||
* @SWG\Property(property="public_notes", type="string", example="Notes")
|
||||
* @SWG\Property(property="invoice_type_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="is_recurring", type="boolean", example=false)
|
||||
* @SWG\Property(property="frequency_id", type="integer", example=1)
|
||||
* @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true)
|
||||
* @SWG\Property(property="recurring_invoice_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="tax_name1", type="string", example="VAT")
|
||||
* @SWG\Property(property="tax_name2", type="string", example="Upkeep")
|
||||
* @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5")
|
||||
* @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0")
|
||||
* @SWG\Property(property="is_amount_discount", type="boolean", example=false)
|
||||
* @SWG\Property(property="invoice_footer", type="string", example="Footer")
|
||||
* @SWG\Property(property="partial", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="auto_bill", type="boolean", example=false)
|
||||
* @SWG\Property(property="custom_value1", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="custom_value2", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="custom_taxes1", type="boolean", example=false)
|
||||
* @SWG\Property(property="custom_taxes2", type="boolean", example=false)
|
||||
* @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="quote_invoice_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value")
|
||||
* @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value")
|
||||
* @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="is_public", type="boolean", example=false)
|
||||
* @SWG\Property(property="filename", type="string", example="Filename", readOnly=true)
|
||||
*/
|
||||
|
||||
protected $defaultIncludes = [
|
||||
// 'invoice_items',
|
||||
];
|
||||
|
@ -15,58 +15,10 @@ use App\Models\Quote;
|
||||
use App\Models\RecurringQuote;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="Invoice", required={"invoice_number"}, @SWG\Xml(name="Invoice"))
|
||||
*/
|
||||
class RecurringQuoteTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
/**
|
||||
* @SWG\Property(property="id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="amount", type="number", format="float", example=10, readOnly=true)
|
||||
* @SWG\Property(property="balance", type="number", format="float", example=10, readOnly=true)
|
||||
* @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="archived_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="is_deleted", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="client_id", type="integer", example=1)
|
||||
* @SWG\Property(property="status_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="invoice_number", type="string", example="0001")
|
||||
* @SWG\Property(property="discount", type="number", format="float", example=10)
|
||||
* @SWG\Property(property="po_number", type="string", example="0001")
|
||||
* @SWG\Property(property="invoice_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="due_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="terms", type="string", example="sample")
|
||||
* @SWG\Property(property="private_notes", type="string", example="Notes")
|
||||
* @SWG\Property(property="public_notes", type="string", example="Notes")
|
||||
* @SWG\Property(property="invoice_type_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="is_recurring", type="boolean", example=false)
|
||||
* @SWG\Property(property="frequency_id", type="integer", example=1)
|
||||
* @SWG\Property(property="start_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="end_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="last_sent_date", type="string", format="date", example="2018-01-01", readOnly=true)
|
||||
* @SWG\Property(property="recurring_invoice_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="tax_name1", type="string", example="VAT")
|
||||
* @SWG\Property(property="tax_name2", type="string", example="Upkeep")
|
||||
* @SWG\Property(property="tax_rate1", type="number", format="float", example="17.5")
|
||||
* @SWG\Property(property="tax_rate2", type="number", format="float", example="30.0")
|
||||
* @SWG\Property(property="is_amount_discount", type="boolean", example=false)
|
||||
* @SWG\Property(property="invoice_footer", type="string", example="Footer")
|
||||
* @SWG\Property(property="partial", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="partial_due_date", type="string", format="date", example="2018-01-01")
|
||||
* @SWG\Property(property="has_tasks", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="auto_bill", type="boolean", example=false)
|
||||
* @SWG\Property(property="custom_value1", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="custom_value2", type="number",format="float", example=10)
|
||||
* @SWG\Property(property="custom_taxes1", type="boolean", example=false)
|
||||
* @SWG\Property(property="custom_taxes2", type="boolean", example=false)
|
||||
* @SWG\Property(property="has_expenses", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="quote_invoice_id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="custom_text_value1", type="string", example="Custom Text Value")
|
||||
* @SWG\Property(property="custom_text_value2", type="string", example="Custom Text Value")
|
||||
* @SWG\Property(property="is_quote", type="boolean", example=false, readOnly=true)
|
||||
* @SWG\Property(property="is_public", type="boolean", example=false)
|
||||
* @SWG\Property(property="filename", type="string", example="Filename", readOnly=true)
|
||||
*/
|
||||
|
||||
protected $defaultIncludes = [
|
||||
// 'invoice_items',
|
||||
];
|
||||
|
@ -21,33 +21,10 @@ use App\Transformers\CompanyTransformer;
|
||||
use App\Transformers\CompanyUserTransformer;
|
||||
use App\Utils\Traits\MakesHash;
|
||||
|
||||
/**
|
||||
* @SWG\Definition(definition="User", @SWG\Xml(name="User"))
|
||||
*/
|
||||
class UserTransformer extends EntityTransformer
|
||||
{
|
||||
use MakesHash;
|
||||
/**
|
||||
* @SWG\Property(property="id", type="integer", example=1, readOnly=true)
|
||||
* @SWG\Property(property="first_name", type="string", example="John")
|
||||
* @SWG\Property(property="last_name", type="string", example="Doe")
|
||||
* @SWG\Property(property="email", type="string", example="johndoe@isp.com")
|
||||
* @SWG\Property(property="account_key", type="string", example="123456")
|
||||
* @SWG\Property(property="updated_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="deleted_at", type="integer", example=1451160233, readOnly=true)
|
||||
* @SWG\Property(property="phone", type="string", example="(212) 555-1212")
|
||||
* @SWG\Property(property="registered", type="boolean", example=false)
|
||||
* @SWG\Property(property="confirmed", type="boolean", example=false)
|
||||
* @SWG\Property(property="oauth_user_id", type="integer", example=1)
|
||||
* @SWG\Property(property="oauth_provider_id", type="integer", example=1)
|
||||
* @SWG\Property(property="notify_sent", type="boolean", example=false)
|
||||
* @SWG\Property(property="notify_viewed", type="boolean", example=false)
|
||||
* @SWG\Property(property="notify_paid", type="boolean", example=false)
|
||||
* @SWG\Property(property="notify_approved", type="boolean", example=false)
|
||||
* @SWG\Property(property="is_admin", type="boolean", example=false)
|
||||
* @SWG\Property(property="permissions", type="integer", example=1)
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
|
@ -263,6 +263,7 @@ class CreateUsersTable extends Migration
|
||||
$table->string('website')->nullable();
|
||||
$table->text('private_notes')->nullable();
|
||||
$table->text('client_hash')->nullable();
|
||||
$table->string('logo', 255)->nullable();
|
||||
|
||||
$table->decimal('balance', 13, 2)->nullable();
|
||||
$table->decimal('paid_to_date', 13, 2)->nullable();
|
||||
|
@ -38,6 +38,14 @@
|
||||
<directory suffix=".php">./app/Observers</directory>
|
||||
<directory suffix=".php">./app/Policies</directory>
|
||||
<directory suffix=".php">./app/Jobs</directory>
|
||||
<directory suffix=".php">./app/Factory</directory>
|
||||
<directory suffix=".php">./app/Helpers</directory>
|
||||
<directory suffix=".php">./app/Libraries</directory>
|
||||
<directory suffix=".php">./app/Listeners</directory>
|
||||
<directory suffix=".php">./app/Mail</directory>
|
||||
<directory suffix=".php">./app/Notifications</directory>
|
||||
<directory suffix=".php">./app/Providers</directory>
|
||||
<directory suffix=".php">./app/Repositories</directory>
|
||||
<directory suffix=".php">./app/Filters</directory>
|
||||
<file>./app/Console/Kernel.php</file>
|
||||
<file>./app/Constants.php</file>
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
{!! Former::framework('TwitterBootstrap4'); !!}
|
||||
|
||||
{!! Former::horizontal_open()
|
||||
{!! Former::horizontal_open_for_files()
|
||||
->id('update_settings')
|
||||
->route('client.profile.edit_client', auth()->user()->hashed_id)
|
||||
->method('PUT'); !!}
|
||||
@ -22,9 +22,28 @@
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="card align-items-center">
|
||||
<div class="card-body">
|
||||
@if(auth()->user()->client->logo)
|
||||
<img src="{{ auth()->user()->client->logo }}" class="img-fluid">
|
||||
@else
|
||||
<i class="fa fa-user fa-5x"></i>
|
||||
@endif
|
||||
|
||||
{!! Former::file('logo')
|
||||
->max(2, 'MB')
|
||||
->accept('image')
|
||||
->label('')
|
||||
->inlineHelp(trans('texts.logo_help')) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-6 pull-left">
|
||||
{!! Former::text('name')->label( ctrans('texts.name')) !!}
|
||||
{!! Former::text('website')->label( ctrans('texts.website')) !!}
|
||||
<div class="card card-body">
|
||||
{!! Former::text('name')->label( ctrans('texts.name')) !!}
|
||||
{!! Former::text('website')->label( ctrans('texts.website')) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
<div class="col-sm-12">
|
||||
<div class="card">
|
||||
<div class="card-header">
|
||||
<strong> {{ ctrans('texts.user_details') }}</strong>
|
||||
<strong> {{ ctrans('texts.details') }}</strong>
|
||||
</div>
|
||||
|
||||
{!! Former::framework('TwitterBootstrap4'); !!}
|
||||
@ -30,23 +30,6 @@
|
||||
<div class="card-body">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
<div class="card align-items-center">
|
||||
<div class="card-body">
|
||||
@if(auth()->user()->avatar)
|
||||
<img src="{{ auth()->user()->avatar }}" class="img-fluid">
|
||||
@else
|
||||
<i class="fa fa-user fa-5x"></i>
|
||||
@endif
|
||||
|
||||
{!! Former::file('avatar')
|
||||
->max(2, 'MB')
|
||||
->accept('image')
|
||||
->label('')
|
||||
->inlineHelp(trans('texts.logo_help')) !!}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
Loading…
x
Reference in New Issue
Block a user