@powerhousedao/network-admin 0.0.21 → 0.0.22
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/editors/network-admin/components/DriveExplorer.d.ts.map +1 -1
- package/dist/editors/network-admin/components/DriveExplorer.js +61 -13
- package/dist/editors/network-admin/index.d.ts.map +1 -1
- package/dist/editors/network-admin/index.js +1 -0
- package/dist/editors/workstream/editor.d.ts.map +1 -1
- package/dist/editors/workstream/editor.js +17 -16
- package/dist/style.css +8327 -8484
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DriveExplorer.d.ts","sourceRoot":"","sources":["../../../../editors/network-admin/components/DriveExplorer.tsx"],"names":[],"mappings":"AAuCA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"DriveExplorer.d.ts","sourceRoot":"","sources":["../../../../editors/network-admin/components/DriveExplorer.tsx"],"names":[],"mappings":"AAuCA;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,GAAG,2CAmoBvC"}
|
|
@@ -111,26 +111,74 @@ export function DriveExplorer(props) {
|
|
|
111
111
|
?.alternativeProposals;
|
|
112
112
|
}
|
|
113
113
|
// Only include documents that actually exist
|
|
114
|
-
const wstrChildDocs = [
|
|
114
|
+
const wstrChildDocs = [rfpDoc].filter((doc) => doc !== undefined && doc !== null);
|
|
115
115
|
const returnableChildren = {
|
|
116
116
|
id: `editor-${doc.header.id}`,
|
|
117
117
|
title: `${doc.state?.global?.code ? doc.state?.global?.code + " - " : ""}${doc.state?.global?.title || doc.header.name}`,
|
|
118
|
-
children: wstrChildDocs.map((childDoc) =>
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
children: wstrChildDocs.map((childDoc) => {
|
|
119
|
+
let dynamicTitle = childDoc?.header.documentType === "powerhouse/rfp"
|
|
120
|
+
? `Request For Proposal`
|
|
121
|
+
: `${childDoc.state?.global?.code ? childDoc.state?.global?.code + " - " : ""}${childDoc.state?.global?.title || childDoc.header.name}`;
|
|
122
|
+
return {
|
|
123
|
+
id: `editor-${childDoc.header.id}`,
|
|
124
|
+
title: dynamicTitle,
|
|
125
|
+
};
|
|
126
|
+
}),
|
|
122
127
|
};
|
|
128
|
+
wstrChildDocs.push(sowDoc);
|
|
129
|
+
wstrChildDocs.push(pmtDoc);
|
|
130
|
+
// if sowDoc or pmtDoc is included in the wstrChildDocs, then add a child with the title "Initial Proposal"
|
|
131
|
+
if (wstrChildDocs.includes(sowDoc) ||
|
|
132
|
+
wstrChildDocs.includes(pmtDoc)) {
|
|
133
|
+
returnableChildren.children.push({
|
|
134
|
+
id: "initial-proposal",
|
|
135
|
+
title: "Initial Proposal",
|
|
136
|
+
children: wstrChildDocs
|
|
137
|
+
.filter((childDoc) => childDoc &&
|
|
138
|
+
childDoc.header &&
|
|
139
|
+
(childDoc.header.documentType ===
|
|
140
|
+
"powerhouse/scopeofwork" ||
|
|
141
|
+
childDoc.header.documentType === "payment-terms"))
|
|
142
|
+
.map((childDoc) => {
|
|
143
|
+
let dynamicTitle = childDoc.header.documentType ===
|
|
144
|
+
"powerhouse/scopeofwork"
|
|
145
|
+
? "Scope of Work"
|
|
146
|
+
: childDoc.header.documentType === "payment-terms"
|
|
147
|
+
? "Payment Terms"
|
|
148
|
+
: null;
|
|
149
|
+
return {
|
|
150
|
+
id: `editor-${childDoc.header.id}`,
|
|
151
|
+
title: dynamicTitle,
|
|
152
|
+
};
|
|
153
|
+
}),
|
|
154
|
+
});
|
|
155
|
+
}
|
|
123
156
|
if (alternativeProposals.length > 0) {
|
|
124
|
-
const altSowDoc = allDocuments?.find((doc) => doc.header.id === alternativeProposals[0].sow);
|
|
125
|
-
const altPaymentTermsDoc = allDocuments?.find((doc) => doc.header.id === alternativeProposals[0].paymentTerms);
|
|
126
|
-
const altChildDocs = [altSowDoc, altPaymentTermsDoc].filter((doc) => doc !== undefined && doc !== null);
|
|
127
157
|
returnableChildren.children.push({
|
|
128
158
|
id: "alternative-proposals",
|
|
129
|
-
title:
|
|
130
|
-
children:
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
159
|
+
title: `Alternative Proposals (${alternativeProposals.length})`,
|
|
160
|
+
children: alternativeProposals.map((proposal) => {
|
|
161
|
+
// Find documents for this specific proposal
|
|
162
|
+
const proposalSowDoc = allDocuments?.find((doc) => doc.header.id === proposal.sow);
|
|
163
|
+
const proposalPaymentTermsDoc = allDocuments?.find((doc) => doc.header.id === proposal.paymentTerms);
|
|
164
|
+
// Filter to only include documents that exist
|
|
165
|
+
const proposalChildDocs = [proposalSowDoc, proposalPaymentTermsDoc].filter((doc) => doc !== undefined && doc !== null);
|
|
166
|
+
return {
|
|
167
|
+
id: `alternative-proposal-${proposal.id}`,
|
|
168
|
+
title: `${proposal.author.name}`,
|
|
169
|
+
children: proposalChildDocs.map((childDoc) => {
|
|
170
|
+
let dynamicTitle = childDoc.header.documentType === "powerhouse/scopeofwork"
|
|
171
|
+
? "Scope of Work"
|
|
172
|
+
: childDoc.header.documentType === "payment-terms"
|
|
173
|
+
? "Payment Terms"
|
|
174
|
+
: null;
|
|
175
|
+
return {
|
|
176
|
+
id: `editor-${childDoc.header.id}`,
|
|
177
|
+
title: dynamicTitle,
|
|
178
|
+
};
|
|
179
|
+
}),
|
|
180
|
+
};
|
|
181
|
+
}),
|
|
134
182
|
});
|
|
135
183
|
}
|
|
136
184
|
return returnableChildren;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../editors/network-admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGxE,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../editors/network-admin/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGxE,eAAO,MAAM,MAAM,EAAE,iBAoBpB,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/workstream/editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,WAAW,EAAc,MAAM,gBAAgB,CAAC;AAiCtE,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC;AAsBjC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,GAAG,
|
|
1
|
+
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../editors/workstream/editor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAU,WAAW,EAAc,MAAM,gBAAgB,CAAC;AAiCtE,MAAM,MAAM,MAAM,GAAG,WAAW,CAAC;AAsBjC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,KAAK,EAAE,GAAG,2CAuiCxC"}
|
|
@@ -146,7 +146,7 @@ export default function Editor(props) {
|
|
|
146
146
|
rfpDocumentNode.header.id === "") {
|
|
147
147
|
setRfpDocument((prev) => (prev === undefined ? prev : undefined));
|
|
148
148
|
}
|
|
149
|
-
}, [rfpDocumentNode, rfpDocumentDataState]);
|
|
149
|
+
}, [rfpDocumentNode, rfpDocumentDataState, newlyCreatedRfpId]);
|
|
150
150
|
const searchRfpDocuments = (userInput) => {
|
|
151
151
|
const results = allDocuments?.filter((node) => node.header.documentType === "powerhouse/rfp" &&
|
|
152
152
|
(!userInput ||
|
|
@@ -261,12 +261,13 @@ export default function Editor(props) {
|
|
|
261
261
|
editable: true,
|
|
262
262
|
onSave: (newValue, context) => {
|
|
263
263
|
if (newValue !== context.row.title) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
264
|
+
dispatch(actions.editAlternativeProposal({
|
|
265
|
+
id: context.row.id,
|
|
266
|
+
proposalAuthor: {
|
|
267
|
+
id: context.row.authorId,
|
|
268
|
+
name: newValue,
|
|
269
|
+
},
|
|
270
|
+
}));
|
|
270
271
|
return true;
|
|
271
272
|
}
|
|
272
273
|
return false;
|
|
@@ -365,11 +366,11 @@ export default function Editor(props) {
|
|
|
365
366
|
if (e.target.value !== state.client?.icon) {
|
|
366
367
|
handleClientChange("icon", e.target.value);
|
|
367
368
|
}
|
|
368
|
-
}, placeholder: "Enter client icon URL" })] })] })] })] }),
|
|
369
|
+
}, placeholder: "Enter client icon URL" })] })] })] })] }), _jsxs("div", { className: "bg-white rounded-lg p-6 mt-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Request for Proposal" }), _jsxs("div", { className: "w-full flex flex-row items-center gap-8", children: [_jsx("div", { className: "w-[350px]", children: _jsx(OIDInput, { name: "Request for Proposal", label: "RFP Document", placeholder: "Search for RFP Document", variant: "withValueTitleAndDescription", value: newlyCreatedRfpId || state.rfp?.id || "", onBlur: (e) => {
|
|
369
370
|
if (e.target.value !== state.rfp?.id) {
|
|
370
371
|
dispatch(actions.setRequestForProposal({
|
|
371
372
|
rfpId: e.target.value,
|
|
372
|
-
title: rfpDocument
|
|
373
|
+
title: rfpDocument?.document.title || "",
|
|
373
374
|
}));
|
|
374
375
|
}
|
|
375
376
|
},
|
|
@@ -409,19 +410,19 @@ export default function Editor(props) {
|
|
|
409
410
|
};
|
|
410
411
|
}, initialOptions: [
|
|
411
412
|
{
|
|
412
|
-
value: rfpDocument
|
|
413
|
-
title: rfpDocument
|
|
413
|
+
value: rfpDocument?.header.id || "",
|
|
414
|
+
title: rfpDocument?.document.title || "",
|
|
414
415
|
path: {
|
|
415
|
-
text: rfpDocument
|
|
416
|
-
url: rfpDocument
|
|
416
|
+
text: rfpDocument?.document.title || "",
|
|
417
|
+
url: rfpDocument?.header.id || "",
|
|
417
418
|
},
|
|
418
419
|
description: "",
|
|
419
420
|
icon: "File",
|
|
420
421
|
},
|
|
421
|
-
] }) }), _jsx("div", { className: "flex items-center", children: _jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx(Icon, { className: "hover:cursor-pointer hover:bg-gray-500", name: "Moved", size: 18, onClick: () => {
|
|
422
|
+
] }) }), rfpDocument ? (_jsx("div", { className: "flex items-center", children: _jsxs("span", { className: "inline-flex items-center gap-2", children: [_jsx(Icon, { className: "hover:cursor-pointer hover:bg-gray-500", name: "Moved", size: 18, onClick: () => {
|
|
422
423
|
setActiveDocumentId(rfpDocument?.header.id);
|
|
423
424
|
setActiveSidebarNodeId(`editor-${rfpDocument?.header.id}`);
|
|
424
|
-
} }), _jsx("span", { children: "RFP Editor" })] }) })
|
|
425
|
+
} }), _jsx("span", { children: "RFP Editor" })] }) })) : ("")] }), !rfpDocument ? (_jsx("div", { className: "mt-4", children: _jsx(Button, { color: "light", size: "small", className: "cursor-pointer hover:bg-gray-600 hover:text-white", title: "Save Workstream", "aria-description": "Save Workstream", onClick: async () => {
|
|
425
426
|
const createdNode = await createRfpDocument();
|
|
426
427
|
if (createdNode) {
|
|
427
428
|
// Set local state to immediately show the new RFP ID
|
|
@@ -431,7 +432,7 @@ export default function Editor(props) {
|
|
|
431
432
|
title: createdNode.name,
|
|
432
433
|
}));
|
|
433
434
|
}
|
|
434
|
-
}, children: "Create RFP Document" }) })] })
|
|
435
|
+
}, children: "Create RFP Document" }) })) : ("")] }), rfpDocument ? (_jsx("div", { children: state.initialProposal ? (_jsxs("div", { className: "bg-white rounded-lg p-6 mb-6 shadow-sm", children: [_jsx("h1", { className: "text-2xl text-gray-900 mb-4", children: "Initial Proposal" }), _jsxs("div", { className: "flex flex-row gap-4 mb-6", children: [_jsx("div", { className: "flex-1", children: _jsx(TextInput, { label: "Author", value: manualAuthorInput ||
|
|
435
436
|
state.initialProposal?.author?.name ||
|
|
436
437
|
"", onChange: (e) => {
|
|
437
438
|
setManualAuthorInput(e.target.value);
|