@things-factory/product-base 7.1.23 → 7.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-server/service/product/product-query.d.ts +1 -1
- package/dist-server/service/product/product-query.js +5 -5
- package/dist-server/service/product/product-query.js.map +1 -1
- package/dist-server/service/product/product-types.d.ts +2 -2
- package/dist-server/service/product/product-types.js +2 -2
- package/dist-server/service/product/product-types.js.map +1 -1
- package/dist-server/service/product/product.d.ts +1 -1
- package/dist-server/service/product/product.js +1 -1
- package/dist-server/service/product/product.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/server/service/product/product-query.ts +4 -4
- package/server/service/product/product-types.ts +2 -2
- package/server/service/product/product.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/product-base",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.25",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create ./server/migrations/migration"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@things-factory/biz-base": "^7.1.
|
|
27
|
+
"@things-factory/biz-base": "^7.1.24",
|
|
28
28
|
"@things-factory/env": "^7.1.16",
|
|
29
|
-
"@things-factory/routing-base": "^7.1.
|
|
29
|
+
"@things-factory/routing-base": "^7.1.24"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "99180f1ee824d20cd9521b432c3a2bdd1f600354"
|
|
32
32
|
}
|
|
@@ -278,14 +278,14 @@ export class ProductQuery {
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
@FieldResolver(type => String, { nullable: true })
|
|
281
|
-
async
|
|
282
|
-
if (!product.
|
|
281
|
+
async warehouseName(@Root() product: Product): Promise<String | undefined> {
|
|
282
|
+
if (!product.warehouseId) return null
|
|
283
283
|
|
|
284
284
|
const items = await getRepository(Product).query(`
|
|
285
|
-
SELECT w.
|
|
285
|
+
SELECT w.name as "warehouseName" FROM products p LEFT JOIN warehouses w ON p.warehouse_id::uuid = w.id and w.domain_id = p.domain_id WHERE p.id = '${product.id}'
|
|
286
286
|
`)
|
|
287
287
|
|
|
288
|
-
return items[0].
|
|
288
|
+
return items[0].warehouseName || null
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
|
|
@@ -185,7 +185,7 @@ export class NewProduct {
|
|
|
185
185
|
routing?: ObjectRef
|
|
186
186
|
|
|
187
187
|
@Field({ nullable: true })
|
|
188
|
-
|
|
188
|
+
warehouseId?: string
|
|
189
189
|
|
|
190
190
|
@Field(type => GraphQLUpload, { nullable: true })
|
|
191
191
|
thumbnail?: FileUpload
|
|
@@ -413,7 +413,7 @@ export class ProductPatch {
|
|
|
413
413
|
routing?: ObjectRef
|
|
414
414
|
|
|
415
415
|
@Field({ nullable: true })
|
|
416
|
-
|
|
416
|
+
warehouseId?: string
|
|
417
417
|
|
|
418
418
|
@Field(type => GraphQLUpload, { nullable: true })
|
|
419
419
|
thumbnail?: FileUpload
|