Skip to content

Commit 73252b2

Browse files
authored
Merge pull request #19 from Artifizer/main
minor fixes
2 parents 7479ea3 + 0e81066 commit 73252b2

3 files changed

Lines changed: 273 additions & 37 deletions

File tree

apps/web/src/components/SchemaNodeView.tsx

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -398,35 +398,7 @@ export class SchemaNodeView extends Component<NodeProps<any>, {}> {
398398
<div className="flex items-center space-x-2 overflow-hidden">
399399
{this.getIcon()}
400400
<span className="truncate leading-[1.0]" dangerouslySetInnerHTML={{ __html: renderGtsNameWithBreak(this.displayLabel()) }} />
401-
{(this.model?.entity?.file?.name || d.entity?.file?.name) && (
402-
this.isVSCode ? (
403-
<a
404-
className="ml-2 max-w-[40%] truncate text-muted-foreground hover:underline cursor-pointer"
405-
onClick={(e) => {
406-
e.stopPropagation()
407-
const filePath = (this.model?.entity?.file?.path || d.entity?.file?.path)
408-
const appApi: any = (window as any).__GTS_APP_API__
409-
try { appApi?.openFile?.(filePath) } catch {}
410-
}}
411-
title={(this.model?.entity?.file?.path || d.entity?.file?.path) || ''}
412-
>
413-
{(this.model?.entity?.file?.name || d.entity?.file?.name)}
414-
</a>
415-
) : (
416-
!isExpanded ? (
417-
<div className="ml-2 max-w-[40%] truncate">
418-
<Popup closeDelay={200}>
419-
<PopupTrigger>
420-
<span className="block truncate cursor-default text-gray-700">{(this.model?.entity?.file?.name || d.entity?.file?.name)}</span>
421-
</PopupTrigger>
422-
<PopupContent side="bottom" copyableText={(this.model?.entity?.file?.path || d.entity?.file?.path)}>
423-
{(this.model?.entity?.file?.path || d.entity?.file?.path) || ''}
424-
</PopupContent>
425-
</Popup>
426-
</div>
427-
) : null
428-
)
429-
)}
401+
430402
</div>
431403
<Button
432404
variant="ghost"
Lines changed: 264 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,264 @@
1+
{
2+
"$id": "gts.x.commerce.orders.order.v1.0~",
3+
"$schema": "http://json-schema.org/draft-07/schema#",
4+
"title": "Order",
5+
"description": "Base order schema definition for e-commerce orders",
6+
"type": "object",
7+
"properties": {
8+
"id": {
9+
"type": "string",
10+
"format": "uuid",
11+
"description": "Unique identifier for the order"
12+
},
13+
"orderNumber": {
14+
"type": "string",
15+
"description": "Human-readable order number"
16+
},
17+
"status": {
18+
"type": "string",
19+
"enum": [
20+
"pending",
21+
"confirmed",
22+
"processing",
23+
"shipped",
24+
"delivered",
25+
"cancelled",
26+
"refunded",
27+
"returned"
28+
],
29+
"default": "pending",
30+
"description": "Current status of the order"
31+
},
32+
"customerId": {
33+
"type": "string",
34+
"format": "uuid",
35+
"description": "Reference to the customer who placed the order"
36+
},
37+
"customerEmail": {
38+
"type": "string",
39+
"format": "email",
40+
"description": "Email address of the customer"
41+
},
42+
"subtotal": {
43+
"type": "number",
44+
"minimum": 0,
45+
"description": "Subtotal amount before tax and shipping"
46+
},
47+
"taxAmount": {
48+
"type": "number",
49+
"minimum": 0,
50+
"default": 0,
51+
"description": "Tax amount applied to the order"
52+
},
53+
"discountAmount": {
54+
"type": "number",
55+
"minimum": 0,
56+
"default": 0,
57+
"description": "Discount amount applied to the order"
58+
},
59+
"totalAmount": {
60+
"type": "number",
61+
"minimum": 0,
62+
"description": "Final total amount including all charges"
63+
},
64+
"currency": {
65+
"type": "string",
66+
"default": "USD",
67+
"description": "Currency code for all monetary amounts"
68+
},
69+
"items": {
70+
"type": "array",
71+
"items": {
72+
"$ref": "#/definitions/OrderItem"
73+
},
74+
"description": "List of items in the order"
75+
},
76+
"shippingAddress": {
77+
"$ref": "#/definitions/Address",
78+
"description": "Shipping address for the order"
79+
},
80+
"billingAddress": {
81+
"$ref": "#/definitions/Address",
82+
"description": "Billing address for the order"
83+
},
84+
"shippingMethod": {
85+
"type": "string",
86+
"description": "Shipping method selected for the order"
87+
},
88+
"shippingCost": {
89+
"type": "number",
90+
"minimum": 0,
91+
"default": 0,
92+
"description": "Shipping cost for the order"
93+
},
94+
"paymentMethod": {
95+
"type": "string",
96+
"enum": [
97+
"credit_card",
98+
"debit_card",
99+
"paypal",
100+
"bank_transfer",
101+
"cash_on_delivery",
102+
"gift_card"
103+
],
104+
"description": "Payment method used for the order"
105+
},
106+
"paymentStatus": {
107+
"type": "string",
108+
"enum": [
109+
"pending",
110+
"processing",
111+
"completed",
112+
"failed",
113+
"cancelled",
114+
"refunded"
115+
],
116+
"default": "pending",
117+
"description": "Payment status of the order"
118+
},
119+
"paymentReference": {
120+
"type": "string",
121+
"description": "Payment provider reference number"
122+
},
123+
"notes": {
124+
"type": "string",
125+
"description": "Additional notes or comments for the order"
126+
},
127+
"tags": {
128+
"type": "array",
129+
"items": {
130+
"type": "string"
131+
},
132+
"description": "Tags for categorizing or flagging the order"
133+
},
134+
"createdAt": {
135+
"type": "string",
136+
"format": "date-time",
137+
"description": "Timestamp when the order was created"
138+
},
139+
"updatedAt": {
140+
"type": "string",
141+
"format": "date-time",
142+
"description": "Timestamp when the order was last updated"
143+
},
144+
"shippedAt": {
145+
"type": "string",
146+
"format": "date-time",
147+
"description": "Timestamp when the order was shipped"
148+
},
149+
"deliveredAt": {
150+
"type": "string",
151+
"format": "date-time",
152+
"description": "Timestamp when the order was delivered"
153+
}
154+
},
155+
"definitions": {
156+
"OrderItem": {
157+
"type": "object",
158+
"properties": {
159+
"id": {
160+
"type": "string",
161+
"format": "uuid",
162+
"description": "Unique identifier for the order item"
163+
},
164+
"productId": {
165+
"type": "string",
166+
"format": "uuid",
167+
"description": "Reference to the product"
168+
},
169+
"productName": {
170+
"type": "string",
171+
"description": "Name of the product"
172+
},
173+
"productSku": {
174+
"type": "string",
175+
"description": "Stock keeping unit of the product"
176+
},
177+
"quantity": {
178+
"type": "integer",
179+
"minimum": 1,
180+
"description": "Quantity of the product ordered"
181+
},
182+
"unitPrice": {
183+
"type": "number",
184+
"minimum": 0,
185+
"description": "Price per unit of the product"
186+
},
187+
"totalPrice": {
188+
"type": "number",
189+
"minimum": 0,
190+
"description": "Total price for this line item"
191+
},
192+
"discountAmount": {
193+
"type": "number",
194+
"minimum": 0,
195+
"default": 0,
196+
"description": "Discount applied to this item"
197+
},
198+
"taxAmount": {
199+
"type": "number",
200+
"minimum": 0,
201+
"default": 0,
202+
"description": "Tax amount for this item"
203+
},
204+
"metadata": {
205+
"type": "object",
206+
"additionalProperties": true,
207+
"description": "Additional metadata for the order item"
208+
}
209+
},
210+
"required": ["productId", "productName", "quantity", "unitPrice", "totalPrice"]
211+
},
212+
"Address": {
213+
"type": "object",
214+
"properties": {
215+
"id": {
216+
"type": "string",
217+
"format": "uuid",
218+
"description": "Unique identifier for the address"
219+
},
220+
"firstName": {
221+
"type": "string",
222+
"description": "First name of the recipient"
223+
},
224+
"lastName": {
225+
"type": "string",
226+
"description": "Last name of the recipient"
227+
},
228+
"company": {
229+
"type": "string",
230+
"description": "Company name if applicable"
231+
},
232+
"addressLine1": {
233+
"type": "string",
234+
"description": "Primary address line"
235+
},
236+
"addressLine2": {
237+
"type": "string",
238+
"description": "Secondary address line"
239+
},
240+
"city": {
241+
"type": "string",
242+
"description": "City"
243+
},
244+
"state": {
245+
"type": "string",
246+
"description": "State or province"
247+
},
248+
"postalCode": {
249+
"type": "string",
250+
"description": "Postal or ZIP code"
251+
},
252+
"country": {
253+
"type": "string",
254+
"description": "Country code (ISO 3166-1 alpha-2)"
255+
},
256+
"phone": {
257+
"type": "string",
258+
"description": "Phone number"
259+
}
260+
},
261+
"required": ["firstName", "lastName", "addressLine1", "city", "state", "postalCode", "country"]
262+
}
263+
}
264+
}

package-lock.json

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)