Skip to content

Commit c3143b2

Browse files
authored
Merge pull request #1 from FearLessXT/development
Added Plugin
2 parents 2c76d78 + 725fcf2 commit c3143b2

17 files changed

Lines changed: 357 additions & 173 deletions

.DS_Store

10 KB
Binary file not shown.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"@vendure/asset-server-plugin": "^2.1.0",
2222
"@vendure/core": "^2.1.0",
2323
"@vendure/email-plugin": "^2.1.0",
24-
"better-sqlite3": "^8.7.0"
24+
"better-sqlite3": "^8.7.0",
25+
"google-auth-library": "^9.7.0"
2526
},
2627
"devDependencies": {
2728
"@graphql-codegen/cli": "5.0.0",

src/.DS_Store

6 KB
Binary file not shown.

src/compile-admin-ui.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { compileUiExtensions } from '@vendure/ui-devkit/compiler';
22
import path from 'path';
33
import { ReviewsPlugin } from './plugins/reviews/reviews-plugin';
4-
import { nonAngularUiExtensions } from './ui-extensions/ui-extensions';
54

65
if (require.main === module) {
76
// Called directly from command line
@@ -17,7 +16,7 @@ export function customAdminUi(options: { recompile: boolean; devMode: boolean })
1716
if (options.recompile) {
1817
return compileUiExtensions({
1918
outputPath: compiledAppPath,
20-
extensions: [ReviewsPlugin.uiExtensions, nonAngularUiExtensions],
19+
extensions: [ReviewsPlugin.uiExtensions],
2120
devMode: options.devMode,
2221
});
2322
} else {

src/plugins/reviews/ui/providers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ export default [
1818
addNavMenuItem(
1919
{
2020
id: 'reviews',
21-
label: 'Product reviews',
21+
label: 'Product Reviews',
2222
routerLink: ['/extensions/product-reviews'],
2323
icon: 'star',
2424
},
25-
'marketing',
25+
'sales',
2626
),
2727
registerDashboardWidget('reviews', {
2828
title: 'Latest reviews',
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { DeepPartial, ID, EntityId, ProductVariant, VendureEntity, } from "@vendure/core";
2+
import { Column, Entity, ManyToOne } from 'typeorm';
3+
4+
export class WishlistItem extends VendureEntity {
5+
constructor(input?: DeepPartial<WishlistItem>) {
6+
super(input);
7+
8+
}
9+
10+
@ManyToOne(type => ProductVariant)
11+
productVariant: ProductVariant;
12+
13+
@EntityId()
14+
productVariantId: ID;
15+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { PluginCommonModule, VendurePlugin } from "@vendure/core";
2+
import { WishlistItem } from "./entities/wishlist-item.entity";
3+
4+
@VendurePlugin({
5+
imports: [PluginCommonModule],
6+
entities: [WishlistItem]
7+
})
8+
9+
export class WishlistPlugin {}

src/ui-extensions/README.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/ui-extensions/modules/providers.ts

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/ui-extensions/modules/vue-ui-extension.module.ts

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)