+ {/* Reviewer identity */}
-
-
setReviewerName(e.target.value)}
- placeholder="Enter your name"
- className="w-full px-4 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-brand-primary/20 focus:border-brand-primary bg-surface transition-colors"
- />
+
+ {artefact.approvers?.length === 1 ? (
+
+
+ {artefact.approvers[0].name}
+
+ ) : artefact.approvers?.length > 1 ? (
+
+ ) : (
+
setReviewerName(e.target.value)}
+ placeholder="Enter your name"
+ className="w-full px-4 py-2 text-sm border border-border rounded-lg bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-brand-primary/20 focus:border-brand-primary transition-colors"
+ />
+ )}
@@ -413,7 +436,7 @@ export default function PublicReview() {
onChange={e => setFeedback(e.target.value)}
rows={4}
placeholder="Share your thoughts, suggestions, or required changes..."
- className="w-full px-4 py-2 border border-border rounded-lg focus:outline-none focus:ring-2 focus:ring-brand-primary/20 focus:border-brand-primary bg-surface transition-colors"
+ className="w-full px-4 py-2 text-sm border border-border rounded-lg bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-brand-primary/20 focus:border-brand-primary transition-colors"
/>
diff --git a/server/server.js b/server/server.js
index 24336e8..2a213d4 100644
--- a/server/server.js
+++ b/server/server.js
@@ -3492,9 +3492,18 @@ app.get('/api/public/review/:token', async (req, res) => {
limit: 1000,
});
+ // Resolve approver names
+ const approvers = [];
+ if (artefact.approver_ids) {
+ for (const id of artefact.approver_ids.split(',').filter(Boolean)) {
+ approvers.push({ id: Number(id), name: await getRecordName('Users', Number(id)) });
+ }
+ }
+
res.json({
...artefact,
brand_name: await getRecordName('Brands', artefact.brand_id),
+ approvers,
version: versionData,
version_number: reviewVersionNumber,
texts,
@@ -3569,7 +3578,7 @@ app.post('/api/public/review/:token/reject', async (req, res) => {
});
app.post('/api/public/review/:token/revision', async (req, res) => {
- const { feedback } = req.body;
+ const { feedback, approved_by_name } = req.body;
try {
const artefacts = await nocodb.list('Artefacts', {
where: `(approval_token,eq,${req.params.token})`,
@@ -3586,6 +3595,7 @@ app.post('/api/public/review/:token/revision', async (req, res) => {
await nocodb.update('Artefacts', artefact.Id, {
status: 'revision_requested',
+ approved_by_name: approved_by_name || '',
feedback: feedback || '',
});