@powerhousedao/contributor-billing 0.0.15 → 0.0.17

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.
@@ -98,13 +98,13 @@ const LineItemsTable = (props) => {
98
98
  if (showTagTable) {
99
99
  return (_jsx(LineItemTagsTable, { lineItems: state.lineItems, onClose: () => setShowTagTable(false), dispatch: dispatch }));
100
100
  }
101
- return (_jsxs("div", { className: "mt-2 overflow-x-auto", ref: tableRef, children: [_jsxs("div", { className: "flex justify-between mt-6", children: [_jsx("div", { className: "flex items-center", children: _jsx("h1", { className: "text-1xl font-bold", children: "Line Items" }) }), _jsx("div", { className: "flex items-center", children: _jsx(Tag, { style: {
101
+ return (_jsxs("div", { className: "mt-2 overflow-x-auto", children: [_jsxs("div", { className: "flex justify-between mt-6", children: [_jsx("div", { className: "flex items-center", children: _jsx("h1", { className: "text-1xl font-bold", children: "Line Items" }) }), _jsx("div", { className: "flex items-center", children: _jsx(Tag, { style: {
102
102
  cursor: "pointer",
103
103
  width: 28,
104
104
  height: 28,
105
105
  color: "white",
106
106
  fill: "#475264",
107
- }, onClick: () => setShowTagTable(!showTagTable) }) })] }), _jsx("div", { className: "mt-4 min-w-[900px]", children: _jsxs("table", { className: "w-full border border-gray-300 text-sm", children: [_jsx("thead", { children: _jsxs("tr", { className: "bg-gray-100", children: [_jsx("th", { className: "border px-2 py-1 w-10", children: "#" }), _jsx("th", { className: "border px-2 py-1", children: "Desc" }), _jsx("th", { className: "border px-2 py-1 w-40", children: "Unit" }), _jsx("th", { className: "border px-2 py-1 w-16", children: "Qty" }), _jsx("th", { className: "border px-2 py-1 w-16", children: "FIAT/Uni" }), _jsx("th", { className: "border px-2 py-1 w-16", children: "POWT/Uni" }), _jsx("th", { className: "border px-2 py-1 w-16", children: "Total Fiat" }), _jsx("th", { className: "border px-2 py-1 w-16", children: "Total POWT" })] }) }), _jsx("tbody", { children: state.lineItems.map((item, idx) => (editingRow === idx ? (_jsxs("tr", { className: "bg-yellow-50", children: [_jsx("td", { className: "border px-2 py-1 text-center w-10", children: idx + 1 }), _jsx("td", { className: "border px-2 py-1 w-40", children: _jsx(InputField, { input: localLineItem.description, value: localLineItem.description, onBlur: () => { }, handleInputChange: (e) => handleInputChange("description", e.target.value), className: "w-full px-1 py-1 border rounded" }) }), _jsx("td", { className: "border px-2 py-1 w-16", children: _jsx(Select, { options: units, value: localLineItem.unit, onChange: (value) => handleInputChange("unit", value), className: "w-32 px-1 py-1 border rounded" }) }), _jsx("td", { className: "border px-2 py-1 w-16", children: _jsx(NumberForm, { number: localLineItem.quantity, handleInputChange: (e) => handleInputChange("quantity", e.target.value), className: "w-32 px-4 py-1 border rounded text-center" }) }), _jsx("td", { className: "border px-2 py-1 w-16", children: _jsx(NumberForm, { number: localLineItem.unitPriceCash, handleInputChange: (e) => handleInputChange("unitPriceCash", String(e.target.value)), className: "w-32 px-4 py-1 border rounded text-center" }) }), _jsx("td", { className: "border px-2 py-1 w-16", children: _jsx(NumberForm, { number: localLineItem.unitPricePwt, handleInputChange: (e) => handleInputChange("unitPricePwt", e.target.value), className: "w-32 px-4 py-1 border rounded text-center" }) }), _jsx("td", { className: "border px-2 py-1 text-center", children: localLineItem.quantity && localLineItem.unitPriceCash
107
+ }, onClick: () => setShowTagTable(!showTagTable) }) })] }), _jsx("div", { className: "mt-4 min-w-[900px]", ref: tableRef, children: _jsxs("table", { className: "w-full border border-gray-300 text-sm", children: [_jsx("thead", { className: "h-12", children: _jsxs("tr", { className: "bg-gray-100 h-10", children: [_jsx("th", { className: "border px-2 py-1 w-10", children: "#" }), _jsx("th", { className: "border px-2 py-1 w-72", children: "Desc" }), _jsx("th", { className: "border px-2 py-1 w-40", children: "Unit" }), _jsx("th", { className: "border px-2 py-1 w-16", children: "Qty" }), _jsx("th", { className: "border px-2 py-1 w-16", children: "FIAT/Unit" }), _jsx("th", { className: "border px-2 py-1 w-16", children: "POWT/Unit" }), _jsx("th", { className: "border px-2 py-1 w-16", children: "Total Fiat" }), _jsx("th", { className: "border px-2 py-1 w-16", children: "Total POWT" })] }) }), _jsx("tbody", { children: state.lineItems.map((item, idx) => (editingRow === idx ? (_jsxs("tr", { className: "bg-yellow-100", children: [_jsx("td", { className: "border px-2 py-1 text-center w-10", children: idx + 1 }), _jsx("td", { className: "border px-2 py-1 w-72", children: _jsx(InputField, { input: localLineItem.description, value: localLineItem.description, onBlur: () => { }, handleInputChange: (e) => handleInputChange("description", e.target.value), className: "w-full px-1 py-1 border rounded" }) }), _jsx("td", { className: "border px-2 py-1 w-16", children: _jsx(Select, { options: units, value: localLineItem.unit, onChange: (value) => handleInputChange("unit", value), className: "w-32 px-1 py-1 border rounded" }) }), _jsx("td", { className: "border px-2 py-1 w-16", children: _jsx(NumberForm, { number: localLineItem.quantity, handleInputChange: (e) => handleInputChange("quantity", e.target.value), className: "w-32 px-4 py-1 border rounded text-center" }) }), _jsx("td", { className: "border px-2 py-1 w-16", children: _jsx(NumberForm, { number: localLineItem.unitPriceCash, handleInputChange: (e) => handleInputChange("unitPriceCash", String(e.target.value)), className: "w-32 px-4 py-1 border rounded text-center" }) }), _jsx("td", { className: "border px-2 py-1 w-16", children: _jsx(NumberForm, { number: localLineItem.unitPricePwt, handleInputChange: (e) => handleInputChange("unitPricePwt", e.target.value), className: "w-32 px-4 py-1 border rounded text-center" }) }), _jsx("td", { className: "border px-2 py-1 text-center", children: localLineItem.quantity && localLineItem.unitPriceCash
108
108
  ? Number(localLineItem.quantity) * Number(localLineItem.unitPriceCash)
109
109
  : "" }), _jsx("td", { className: "border px-2 py-1 text-center", children: localLineItem.quantity && localLineItem.unitPricePwt
110
110
  ? Number(localLineItem.quantity) * Number(localLineItem.unitPricePwt)
package/dist/style.css CHANGED
@@ -18,7 +18,6 @@
18
18
  --color-orange-700: oklch(55.3% 0.195 38.402);
19
19
  --color-orange-800: oklch(47% 0.157 37.304);
20
20
  --color-orange-900: oklch(40.8% 0.123 38.172);
21
- --color-yellow-50: oklch(98.7% 0.026 102.212);
22
21
  --color-yellow-100: oklch(97.3% 0.071 103.193);
23
22
  --color-yellow-300: oklch(90.5% 0.182 98.111);
24
23
  --color-yellow-400: oklch(85.2% 0.199 91.936);
@@ -392,6 +391,9 @@
392
391
  .h-10 {
393
392
  height: calc(var(--spacing) * 10);
394
393
  }
394
+ .h-12 {
395
+ height: calc(var(--spacing) * 12);
396
+ }
395
397
  .h-32 {
396
398
  height: calc(var(--spacing) * 32);
397
399
  }
@@ -425,6 +427,9 @@
425
427
  .w-64 {
426
428
  width: calc(var(--spacing) * 64);
427
429
  }
430
+ .w-72 {
431
+ width: calc(var(--spacing) * 72);
432
+ }
428
433
  .w-\[200px\] {
429
434
  width: 200px;
430
435
  }
@@ -647,9 +652,6 @@
647
652
  .bg-white {
648
653
  background-color: var(--color-white);
649
654
  }
650
- .bg-yellow-50 {
651
- background-color: var(--color-yellow-50);
652
- }
653
655
  .bg-yellow-100 {
654
656
  background-color: var(--color-yellow-100);
655
657
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@powerhousedao/contributor-billing",
3
3
  "description": "Document models that help contributors of open organisations get paid anonymously for their work on a monthly basis.",
4
- "version": "0.0.15",
4
+ "version": "0.0.17",
5
5
  "license": "AGPL-3.0-only",
6
6
  "type": "module",
7
7
  "files": [