| 123456789101112131415161718192021222324252627282930313233343536 |
- 'use server';
- import { createCintasImportRecord } from './cintas-workflow';
- // Test function to verify the workflow step
- export async function testCreateCintasImportRecord() {
- try {
- // Test with mock data
- const testFileId = 'test-file-id-123';
- const testFileName = 'test-cintas-calendar.xlsx';
-
- const result = await createCintasImportRecord(testFileId, testFileName);
-
- if (result.success && result.data && result.layout) {
- console.log('✅ Successfully created Cintas import record:', {
- importId: result.data.id,
- importName: result.data.name,
- layoutName: result.layout.name,
- layoutId: result.layout.id
- });
- return result;
- } else {
- console.error('❌ Failed to create Cintas import record:', result.error);
- return result;
- }
- } catch (error) {
- console.error('❌ Test error:', error);
- return {
- success: false,
- error: error instanceof Error ? error.message : 'Unknown error'
- };
- }
- }
- // Export for use in the workflow
- export { createCintasImportRecord };
|