@@ -5,23 +5,25 @@ import { belongsTo, hasMany } from 'ember-data/relationships';
5
5
6
6
export default Model . extend ( {
7
7
8
- status : attr ( 'string' ) ,
9
- createdAt : attr ( 'date' ) ,
10
- recentlyUsedAt : attr ( 'date' ) ,
11
- code : attr ( 'string' ) ,
12
- activity : attr ( 'string' ) ,
13
- description : attr ( 'string' ) ,
14
- detailType : attr ( 'string' ) ,
15
- detailId : attr ( 'number' ) ,
16
-
17
- contact : belongsTo ( 'contact' , { async : false } ) ,
18
- organisation : belongsTo ( 'organisation' , { async : false } ) ,
19
- localOrder : belongsTo ( 'local_order' , { async : false } ) ,
20
- items : hasMany ( 'item' , { async : true } ) ,
21
- ordersPackages : hasMany ( 'ordersPackages' , { async : false } ) ,
22
-
8
+ status : attr ( 'string' ) ,
9
+ createdAt : attr ( 'date' ) ,
10
+ recentlyUsedAt : attr ( 'date' ) ,
11
+ code : attr ( 'string' ) ,
12
+ activity : attr ( 'string' ) ,
13
+ description : attr ( 'string' ) ,
14
+ detailType : attr ( 'string' ) ,
15
+ detailId : attr ( 'number' ) ,
16
+
17
+ contact : belongsTo ( 'contact' , { async : false } ) ,
18
+ organisation : belongsTo ( 'organisation' , { async : false } ) ,
19
+ localOrder : belongsTo ( 'local_order' , { async : false } ) ,
20
+ items : hasMany ( 'item' , { async : true } ) ,
21
+ ordersPackages : hasMany ( 'ordersPackages' , { async : false } ) ,
22
+ orderTransport : belongsTo ( 'orderTransport' , { async : false } ) ,
23
+ // purposes: hasMany('purpose', { async: false }),
23
24
24
25
isLocalOrder : Ember . computed . equal ( 'detailType' , 'LocalOrder' ) ,
26
+ isGoodCityOrder : Ember . computed . equal ( 'detailType' , 'GoodCity' ) ,
25
27
26
28
dispatchedItems :
Ember . computed ( '[email protected] ' , function ( ) {
27
29
return this . get ( "items" ) . rejectBy ( 'sentOn' , null ) ;
0 commit comments