Skip to content

Commit

Permalink
Merge branch 'development' of github.com:bakaphp/kanvas-ecosystem-api…
Browse files Browse the repository at this point in the history
… into warehouse-type-update
  • Loading branch information
arfenis committed Feb 19, 2024
2 parents 2bb5a34 + 6917205 commit 46be135
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 31 deletions.
34 changes: 17 additions & 17 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions graphql/schemas/Ecosystem/user.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ input RegisterInput {
password: String! @rules(apply: ["required", "min:8"])
password_confirmation: String! @rules(apply: ["required"])
company_name: String
phone_number: String
custom_fields: [CustomFieldEntityInput!]
}

Expand Down
2 changes: 1 addition & 1 deletion graphql/schemas/Inventory/region.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ type Region {
id: Int!
companies_id: Int!
currency_id: Int!
companies: Company!
companies: Company! @belongsTo(relation: "company")
currencies: Currency!
uuid: String!
name: String!
Expand Down
13 changes: 1 addition & 12 deletions src/Domains/Inventory/Warehouses/Models/Warehouses.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,16 @@ class Warehouses extends BaseModel

protected $guarded = [];

/**
*
*/
public function apps(): BelongsTo
{
return $this->belongsTo(Apps::class, 'apps_id');
}

/**
*
*/
public function regions(): BelongsTo
{
return $this->belongsTo(Regions::class, 'regions_id');
}

public function systemModules(): HasMany
{
return $this->hasMany(SystemModules::class, 'apps_id');
}

public function variantsWarehouses(): HasMany
{
return $this->hasMany(VariantsWarehouses::class, 'warehouses_id');
Expand Down Expand Up @@ -182,7 +171,7 @@ public function isVariantPublished(): ?Attribute
*
* @return Int
*/
public function getTotalProducts(): Int
public function getTotalProducts(): int
{
if (! $totalProducts = $this->get('total_products')) {
$this->set(
Expand Down
3 changes: 2 additions & 1 deletion src/Kanvas/Auth/DataTransferObject/RegisterInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public static function viaRequest(Request $request): self
password: Hash::make($request->get('password')),
default_company: $request->get('default_company') ?? null,
role_ids: $roles,
custom_fields: $request->get('custom_fields') ?? []
custom_fields: $request->get('custom_fields') ?? [],
phone_number: $request->get('phone_number') ?? null,
);
}

Expand Down

0 comments on commit 46be135

Please sign in to comment.