-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82da83e
commit cd47a15
Showing
16 changed files
with
1,490 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { computed } from '@ember/object'; | ||
import { attr, belongsTo } from '@ember-data/model'; | ||
import { format as formatDate, isValid as isValidDate } from 'date-fns'; | ||
|
||
export default class WarehouseAisle extends Model { | ||
/** @ids */ | ||
@attr('string') uuid; | ||
@attr('string') public_id; | ||
@attr('string') company_uuid; | ||
@attr('string') created_by_uuid; | ||
@attr('string') section_uuid; | ||
|
||
/** @relationships */ | ||
@belongsTo('company', { async: true }) company; | ||
@belongsTo('user', { async: true }) createdBy; | ||
@belongsTo('pallet-warehouse-section', { async: true }) section; | ||
|
||
/** @attributes */ | ||
@attr('string') aisle_number; | ||
@attr('polygon') area; | ||
@attr('raw') meta; | ||
|
||
/** @date */ | ||
@attr('date') created_at; | ||
@attr('date') updated_at; | ||
|
||
/** @computed */ | ||
@computed('updated_at') get updatedAgo() { | ||
if (!isValidDate(this.updated_at)) { | ||
return null; | ||
} | ||
return formatDistanceToNow(this.updated_at); | ||
} | ||
|
||
@computed('updated_at') get updatedAt() { | ||
if (!isValidDate(this.updated_at)) { | ||
return null; | ||
} | ||
return formatDate(this.updated_at, 'PPP p'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { computed } from '@ember/object'; | ||
import { attr, belongsTo } from '@ember-data/model'; | ||
import { format as formatDate, isValid as isValidDate } from 'date-fns'; | ||
|
||
export default class WarehouseBin extends Model { | ||
/** @ids */ | ||
@attr('string') uuid; | ||
@attr('string') public_id; | ||
@attr('string') company_uuid; | ||
@attr('string') created_by_uuid; | ||
@attr('string') rack_uuid; | ||
|
||
/** @relationships */ | ||
@belongsTo('company', { async: true }) company; | ||
@belongsTo('user', { async: true }) createdBy; | ||
@belongsTo('pallet-warehouse-rack', { async: true }) rack; | ||
|
||
/** @attributes */ | ||
@attr('string') bin_number; | ||
@attr('string') size; | ||
@attr('string') max_weight; | ||
@attr('raw') meta; | ||
|
||
/** @date */ | ||
@attr('date') created_at; | ||
@attr('date') updated_at; | ||
|
||
/** @computed */ | ||
@computed('updated_at') get updatedAgo() { | ||
if (!isValidDate(this.updated_at)) { | ||
return null; | ||
} | ||
return formatDistanceToNow(this.updated_at); | ||
} | ||
|
||
@computed('updated_at') get updatedAt() { | ||
if (!isValidDate(this.updated_at)) { | ||
return null; | ||
} | ||
return formatDate(this.updated_at, 'PPP p'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { computed } from '@ember/object'; | ||
import { attr, belongsTo } from '@ember-data/model'; | ||
import { format as formatDate, isValid as isValidDate } from 'date-fns'; | ||
|
||
export default class WarehouseDock extends Model { | ||
/** @ids */ | ||
@attr('string') uuid; | ||
@attr('string') public_id; | ||
@attr('string') company_uuid; | ||
@attr('string') created_by_uuid; | ||
@attr('string') warehouse_uuid; | ||
|
||
/** @relationships */ | ||
@belongsTo('company', { async: true }) company; | ||
@belongsTo('user', { async: true }) createdBy; | ||
@belongsTo('place', { async: true }) warehouse; | ||
|
||
/** @attributes */ | ||
@attr('string') dock_number; | ||
@attr('string') direction; | ||
@attr('string') capacity; | ||
@attr('string') status; | ||
@attr('string') type; | ||
@attr('raw') meta; | ||
|
||
/** @date */ | ||
@attr('date') created_at; | ||
@attr('date') updated_at; | ||
|
||
/** @computed */ | ||
@computed('updated_at') get updatedAgo() { | ||
if (!isValidDate(this.updated_at)) { | ||
return null; | ||
} | ||
return formatDistanceToNow(this.updated_at); | ||
} | ||
|
||
@computed('updated_at') get updatedAt() { | ||
if (!isValidDate(this.updated_at)) { | ||
return null; | ||
} | ||
return formatDate(this.updated_at, 'PPP p'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { computed } from '@ember/object'; | ||
import { attr, belongsTo } from '@ember-data/model'; | ||
import { format as formatDate, isValid as isValidDate } from 'date-fns'; | ||
|
||
export default class WarehouseRack extends Model { | ||
/** @ids */ | ||
@attr('string') uuid; | ||
@attr('string') public_id; | ||
@attr('string') company_uuid; | ||
@attr('string') created_by_uuid; | ||
@attr('string') aisle_uuid; | ||
|
||
/** @relationships */ | ||
@belongsTo('company', { async: true }) company; | ||
@belongsTo('user', { async: true }) createdBy; | ||
@belongsTo('pallet-warehouse-aisle', { async: true }) aisle; | ||
|
||
/** @attributes */ | ||
@attr('string') rack_number; | ||
@attr('string') capacity; | ||
@attr('raw') meta; | ||
|
||
/** @date */ | ||
@attr('date') created_at; | ||
@attr('date') updated_at; | ||
|
||
/** @computed */ | ||
@computed('updated_at') get updatedAgo() { | ||
if (!isValidDate(this.updated_at)) { | ||
return null; | ||
} | ||
return formatDistanceToNow(this.updated_at); | ||
} | ||
|
||
@computed('updated_at') get updatedAt() { | ||
if (!isValidDate(this.updated_at)) { | ||
return null; | ||
} | ||
return formatDate(this.updated_at, 'PPP p'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { computed } from '@ember/object'; | ||
import { attr, belongsTo } from '@ember-data/model'; | ||
import { format as formatDate, isValid as isValidDate, formatDistanceToNow } from 'date-fns'; | ||
|
||
export default class WarehouseSectionModel extends Model { | ||
/** @ids */ | ||
@attr('string') uuid; | ||
@attr('string') public_id; | ||
@attr('string') company_uuid; | ||
@attr('string') created_by_uuid; | ||
@attr('string') warehouse_uuid; | ||
|
||
/** @relationships */ | ||
@belongsTo('company', { async: true }) company; | ||
@belongsTo('user', { async: true }) createdBy; | ||
@belongsTo('warehouse', { async: true }) warehouse; | ||
|
||
/** @attributes */ | ||
@attr('string') name; | ||
@attr('string') description; | ||
@attr('polygon') area; | ||
@attr('raw') meta; | ||
|
||
/** @date */ | ||
@attr('date') created_at; | ||
@attr('date') updated_at; | ||
|
||
/** @boolean */ | ||
@attr('boolean') isDeleted; | ||
|
||
/** @computed */ | ||
@computed('updated_at') get updatedAgo() { | ||
if (!isValidDate(this.updated_at)) { | ||
return null; | ||
} | ||
return formatDistanceToNow(this.updated_at); | ||
} | ||
|
||
@computed('updated_at') get updatedAt() { | ||
if (!isValidDate(this.updated_at)) { | ||
return null; | ||
} | ||
return formatDate(this.updated_at, 'PPP p'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.