chore(style): codebase em-dash sweep + minor layout polish
Replaces every em-dash and en-dash with regular ASCII hyphens across comments, JSX strings, and dev-facing logs. Mostly cosmetic but stops the inconsistent mix that crept in over the last few months (some files used em-dashes in comments, others didn't, some used both). Bundles two small dashboard-layout tweaks that touch a couple of already-modified files: - (dashboard)/layout.tsx main padding goes from p-6 to pt-3 px-6 pb-6 so page content sits closer to the topbar. - Sidebar now receives the ports list it needs for the footer port switcher. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -89,7 +89,7 @@ export async function createDefinition(
|
||||
.returning();
|
||||
|
||||
const created = rows[0];
|
||||
if (!created) throw new Error('Insert failed — no row returned');
|
||||
if (!created) throw new Error('Insert failed - no row returned');
|
||||
|
||||
void createAuditLog({
|
||||
userId,
|
||||
@@ -117,7 +117,7 @@ export async function updateDefinition(
|
||||
data: UpdateFieldInput & { fieldType?: unknown },
|
||||
meta: AuditMeta,
|
||||
) {
|
||||
// Immutability guard — fieldType must never change
|
||||
// Immutability guard - fieldType must never change
|
||||
if ('fieldType' in data && data.fieldType !== undefined) {
|
||||
throw new ValidationError('Field type cannot be changed after creation');
|
||||
}
|
||||
@@ -141,7 +141,7 @@ export async function updateDefinition(
|
||||
.returning();
|
||||
|
||||
const updated = updateRows[0];
|
||||
if (!updated) throw new Error('Update failed — no row returned');
|
||||
if (!updated) throw new Error('Update failed - no row returned');
|
||||
|
||||
void createAuditLog({
|
||||
userId,
|
||||
@@ -188,7 +188,7 @@ export async function deleteDefinition(
|
||||
.where(eq(customFieldValues.fieldId, fieldId));
|
||||
const valueCount = countResult[0]?.count ?? 0;
|
||||
|
||||
// Delete definition — CASCADE handles values
|
||||
// Delete definition - CASCADE handles values
|
||||
await db.delete(customFieldDefinitions).where(eq(customFieldDefinitions.id, fieldId));
|
||||
|
||||
void createAuditLog({
|
||||
@@ -269,7 +269,7 @@ export async function setValues(
|
||||
// Tenant scope: verify entityId actually points at a port-scoped row of
|
||||
// the entity type the field definitions target. Without this gate, any
|
||||
// authenticated user could write custom-field rows pointing at arbitrary
|
||||
// entityIds (or none at all) — polluting customFieldValues and creating
|
||||
// entityIds (or none at all) - polluting customFieldValues and creating
|
||||
// a join surface that could later leak data.
|
||||
const entityTypes = new Set(
|
||||
values
|
||||
|
||||
Reference in New Issue
Block a user