Files
Krow-workspace/scripts/patch-layout-query-key.js
bwnyasse 80cd49deb5 feat(Makefile): install frontend dependencies on dev command
feat(Makefile): patch Layout.jsx queryKey for local development
feat(frontend-web): mock base44 client for local development with role switching
feat(frontend-web): add event assignment modal with conflict detection and bulk assign
feat(frontend-web): add client dashboard with key metrics and quick actions
feat(frontend-web): add layout component with role-based navigation
feat(frontend-web): update various pages to use "@/components" alias
feat(frontend-web): update create event page with ai assistant toggle
feat(frontend-web): update dashboard page with new components
feat(frontend-web): update events page with quick assign popover
feat(frontend-web): update invite vendor page with hover card
feat(frontend-web): update messages page with conversation list and message thread
feat(frontend-web): update operator dashboard page with new components
feat(frontend-web): update partner management page with new components
feat(frontend-web): update permissions page with new components
feat(frontend-web): update procurement dashboard page with new components
feat(frontend-web): update smart vendor onboarding page with new components
feat(frontend-web): update staff directory page with new components
feat(frontend-web): update teams page with new components
feat(frontend-web): update user management page with new components
feat(frontend-web): update vendor compliance page with new components
feat(frontend-web): update main.jsx to include react query provider

feat: add vendor marketplace page
feat: add global import fix to prepare-export script
feat: add patch-layout-query-key script to fix query key
feat: update patch-base44-client script to use a more robust method
2025-11-13 14:56:31 -05:00

27 lines
1010 B
JavaScript
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const fs = require('fs');
const path = require('path');
const projectRoot = path.resolve(__dirname, '..');
const layoutFilePath = path.join(projectRoot, 'frontend-web', 'src', 'pages', 'Layout.jsx');
const oldString = ` queryKey: ['current-user-layout'],`;
const newString = ` queryKey: ['current-user'],`;
try {
const content = fs.readFileSync(layoutFilePath, 'utf8');
if (content.includes(oldString)) {
const newContent = content.replace(oldString, newString);
fs.writeFileSync(layoutFilePath, newContent, 'utf8');
console.log('✅ Successfully patched queryKey in frontend-web/src/pages/Layout.jsx');
} else if (content.includes(newString)) {
console.log(' queryKey in Layout.jsx is already patched. Skipping.');
} else {
console.error('❌ Patching failed: Could not find the expected queryKey in Layout.jsx.');
process.exit(1);
}
} catch (error) {
console.error('❌ An error occurred during patching Layout.jsx queryKey:', error);
process.exit(1);
}