fix(stock-location): Stock location address required (#3065)

What:
- Removes the requirement to have an address id while creating a new stock location.
- Add field company to Location Address

FIXES: CORE-1018

Co-authored-by: Oliver Windall Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Carlos R. L. Rodrigues
2023-01-23 12:47:04 +00:00
committed by GitHub
co-authored by Oliver Windall Juhl
parent f65f590a27
commit 2d525237b6
8 changed files with 51 additions and 32 deletions
@@ -9,6 +9,9 @@ export class StockLocationAddress extends SoftDeletableEntity {
@Column({ type: "text", nullable: true })
address_2: string | null
@Column({ type: "text", nullable: true })
company: string | null
@Column({ type: "text", nullable: true })
city: string | null
@@ -16,8 +16,8 @@ export class StockLocation extends SoftDeletableEntity {
name: string
@Index()
@Column({ type: "text" })
address_id: string
@Column({ type: "text", nullable: true })
address_id: string | null
@ManyToOne(() => StockLocationAddress)
@JoinColumn({ name: "address_id" })