Skip to content

Conversation

@Abdullah-Siddiqui-Paysys
Copy link

@Abdullah-Siddiqui-Paysys Abdullah-Siddiqui-Paysys commented Oct 6, 2025

SPDX-License-Identifier: Apache-2.0

What did we change?

Why are we doing this?

How was it tested?

  • Locally
  • Development Environment
  • Not needed, changes very basic
  • Husky successfully run
  • Unit tests passing and Documentation done

@Abdullah-Siddiqui-Paysys Abdullah-Siddiqui-Paysys changed the title feat paysys frontend feat: TCS frontend Oct 6, 2025
Copy link

@omair235 omair235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TAZAMA CONNECTION STUDIO FE

use absolut path everywhere

no error handling using yup for input fields validation

instead of using nested logics and multiple if and else if u can leverage objetct literals it makes code clean and readable

when mapping anything on UI please always use fallback conditions
example -> response.description || 'N/A'

dont use inline logic
onChange={(e) => setCronExpression(e.target.value)} instead use HANDLER

repeating input fields and labels make array of object for fields and map them using 1 jsx template

structure FOR COMPONETS should be :

functions outside component body u they dont recreate in memory after every render
default export
states
useEffects
handlers
api calls
form submission handlers should be the last part before jsx
JSX (it should not be responsible for logical decisions)

a component should not be larger than 400 lines ideally it should be of 200 lines max

we are not using any form management library like react hook form why???

no build in component library for UI like MUI ?? creating css again & again using tailwind why ??

why we are using fetch instead of axios ???

folder structure is also not scalable

remove all console.logs

no custom hooks for logic implementation (too big components single component performing multiple tasks)
not breaking components in to smaller chunks

no helper functions

no coding consistency across the components
no common components (like pagination,loader,error,table,etc etc )
on some places we r using class components some where we r exporting components as default somewhere we are just exporting them

readability of code is very poor
Reusability of code is very poor

console.log is synchorous so please use it for debugging purpose only either remove them or comment out

some useStates have type while some dont have type ??

dont use inline logic in jsx create separate handlers for this

try not to repeat code again & again )for example recreating loader ,error,pagination jsx & css again and agian in every component

no helper functions utility for reusing logic

no customHooks utility for UI and business logic separation

no fallback conditions

no optional chaining

after development please remove all comment out code

@@ -0,0 +1,84 @@
import React, { useState } from 'react';
import { AuthHeader } from '../../../shared/components/AuthHeader';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why using relative paths ??
kindly use absolute paths

}

const ApproverDEMS: React.FC<ApproverDEMSProps> = ({ onBack }) => {
const [endpoints] = useState([]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is setEndpoints?? this will always be an empty array treating.


const handleApprove = (id: number) => {
console.log('Approve endpoint:', id);
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is handleApprove implementation??

};

const handleReject = (id: number) => {
console.log('Reject endpoint:', id);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is handleReject implementation??

};

const handleView = (id: number) => {
console.log('View endpoint:', id);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where is handleView implementation??

Comment on lines 20 to 29
const formatDate = (dateString: string) => {
return new Date(dateString).toLocaleString('en-US', {
year: 'numeric',
month: 'long',
day: 'numeric',
hour: '2-digit',
minute: '2-digit',
});
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be a common function
ATM u r repeating it

Comment on lines 30 to 43
const getStatusColor = (status: string) => {
switch (status) {
case 'PENDING':
return 'bg-yellow-100 text-yellow-800 border-yellow-200';
case 'IN-PROGRESS':
return 'bg-blue-100 text-blue-800 border-blue-200';
case 'SUSPENDED':
return 'bg-red-100 text-red-800 border-red-200';
case 'CLONED':
return 'bg-purple-100 text-purple-800 border-purple-200';
default:
return 'bg-gray-100 text-gray-800 border-gray-200';
}
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this to commons

Comment on lines 180 to 182
<option value="append">Append - Add new records to existing data</option>
<option value="replace">Replace - Replace all existing data</option>
<option value="update">Update - Update existing records</option>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there should be an array of object which is getting mapped here for options

);
};

export default JobDetailsModal;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this whole component is just repeating JSX again & again
u can easily make it clean and readable by just mapping jsx just once

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this has to be divided in to chunks of code
modular based components is the mental model of react please utilize it

Copy link

@omair235 omair235 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TAZAMA CONNECTION STUDIO FE

use absolut path everywhere

no error handling using yup for input fields validation

instead of using nested logics and multiple if and else if u can leverage objetct literals it makes code clean and readable

when mapping anything on UI please always use fallback conditions
example -> response.description || 'N/A'

dont use inline logic
onChange={(e) => setCronExpression(e.target.value)} instead use HANDLER

repeating input fields and labels make array of object for fields and map them using 1 jsx template

structure FOR COMPONETS should be :

functions outside component body u they dont recreate in memory after every render
default export
states
useEffects
handlers
api calls
form submission handlers should be the last part before jsx
JSX (it should not be responsible for logical decisions)

a component should not be larger than 400 lines ideally it should be of 200 lines max

we are not using any form management library like react hook form why???

no build in component library for UI like MUI ?? creating css again & again using tailwind why ??

why we are using fetch instead of axios ???

folder structure is also not scalable

remove all console.logs

no custom hooks for logic implementation (too big components single component performing multiple tasks)
not breaking components in to smaller chunks

no helper functions

no coding consistency across the components
no common components (like pagination,loader,error,table,etc etc )
on some places we r using class components some where we r exporting components as default somewhere we are just exporting them

readability of code is very poor
Reusability of code is very poor

console.log is synchorous so please use it for debugging purpose only either remove them or comment out

some useStates have type while some dont have type ??

dont use inline logic in jsx create separate handlers for this

try not to repeat code again & again )for example recreating loader ,error,pagination jsx & css again and agian in every component

no helper functions utility for reusing logic

no customHooks utility for UI and business logic separation

no fallback conditions

no optional chaining

after development please remove all comment out code

…P conditional field visibility - Support payload editing and regeneration in creation mode - Hide payload editor in edit mode - Add tenantId to endpoint preview - Fix read-only logic for clone/edit modes - Add Functions API integration - Update Docker configuration
…lone options into Actions dropdown in ConfigList - Add Actions dropdown to CronJobList with Edit and Pause/Play options - Remove standalone Clone Configuration button from DEMS - Implement click-outside handler for dropdown menus - Consistent UI pattern across all modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants