-
Notifications
You must be signed in to change notification settings - Fork 173
Expand file tree
/
Copy pathInventoryAsset.php
More file actions
72 lines (63 loc) · 1.59 KB
/
Copy pathInventoryAsset.php
File metadata and controls
72 lines (63 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<?php
/**
* @link https://craftcms.com/
* @copyright Copyright (c) Pixel & Tonic, Inc.
* @license https://craftcms.github.io/license/
*/
namespace craft\commerce\web\assets\inventory;
use craft\web\AssetBundle;
use craft\web\assets\admintable\AdminTableAsset;
use craft\web\assets\cp\CpAsset;
use craft\web\assets\htmx\HtmxAsset;
use craft\web\View;
/**
* Asset bundle for Inventory Assets
*
* @author Pixel & Tonic, Inc. <support@pixelandtonic.com>
* @since 5.0
*/
class InventoryAsset extends AssetBundle
{
/**
* @inheritdoc
*/
public function init(): void
{
$this->sourcePath = __DIR__ . '/dist';
$this->depends = [
CpAsset::class,
HtmxAsset::class,
AdminTableAsset::class,
];
$this->css[] = 'css/inventory.css';
$this->js[] = 'inventory.js';
parent::init();
}
/**
* @inheritdoc
*/
public function registerAssetFiles($view): void
{
parent::registerAssetFiles($view);
if ($view instanceof View) {
$view->registerTranslations('commerce', [
'Item',
'No inventory found.',
'Search inventory',
'No inventory found.',
'Reserved',
'Damaged',
'Safety',
'Quality Control',
'Committed',
'Available',
'On Hand',
'Incoming',
'View',
'Table Columns',
'Purchasable',
'SKU',
]);
}
}
}