Compare commits

...

225 Commits

Author SHA1 Message Date
Pramod Mahajan
93c1fb1844 Merge branch 'Feature_Directory' of https://git.marcoaiot.com/admin/marco.pms.web into Feature_Directory 2025-06-09 13:21:03 +05:30
Pramod Mahajan
0886990f9d if have't any bucket user can't create contacts 2025-06-09 13:18:34 +05:30
Pramod Mahajan
c7b93006d8 changed class to className 2025-06-09 13:18:34 +05:30
Pramod Mahajan
b71ca1c7fb resolve React key duplication warning in Breadcrumb component 2025-06-09 13:18:34 +05:30
Pramod Mahajan
1d43470783 changed icon 2025-06-09 13:18:33 +05:30
Pramod Mahajan
33f5bb3517 Updated to make sure the client sends the correct request. Unnecessary requests are no longer sent. 2025-06-09 13:18:33 +05:30
Pramod Mahajan
e3731cab5f added refetch function for recall after takng any assign or unassign project for update 2025-06-09 13:18:33 +05:30
Pramod Mahajan
71631fa68d added update assign project api 2025-06-09 13:18:33 +05:30
Pramod Mahajan
0b99238fa8 added api's for fetching projects by employee and update project assigning for employee 2025-06-09 13:18:33 +05:30
Pramod Mahajan
376ead7967 added modal for AssignToProject 2025-06-09 13:18:33 +05:30
Pramod Mahajan
51c02c7156 created component for assign and unassign projects for employee 2025-06-09 13:18:33 +05:30
Pramod Mahajan
977397d31f added new hook for fetching projects associated by perticular employee 2025-06-09 13:18:32 +05:30
Pramod Mahajan
b77389284c enhance UX for loading and empty states in contact table 2025-06-09 13:18:32 +05:30
Pramod Mahajan
29ef1e4016 enhance UX for loading and empty states in contact table 2025-06-09 13:18:32 +05:30
Pramod Mahajan
8d966fc5c0 enable contact name click to open contact profile 2025-06-09 13:18:32 +05:30
Pramod Mahajan
901f633177 handled error , if does'nt have category 2025-06-09 13:16:25 +05:30
Pramod Mahajan
d23a090cd5 show "NA" for missing email in contact list view 2025-06-09 13:16:25 +05:30
Pramod Mahajan
456fa6d385 show "NA" in phone number columns when contact is created without a phone number 2025-06-09 13:16:25 +05:30
Pramod Mahajan
7bf3d69174 recall usebucket hook after delete and create contact. 2025-06-09 13:16:25 +05:30
Pramod Mahajan
d5d5ecafa9 Update modal size from lg to xl for improved layout on larger screens 2025-06-09 13:16:25 +05:30
Pramod Mahajan
49dfc084c0 Replaced inline styles with Bootstrap utility classes 2025-06-09 13:16:25 +05:30
Pramod Mahajan
0026de943b fixed width 100 % for editor 2025-06-09 13:16:24 +05:30
Pramod Mahajan
3e61a9959e it able t taking tag from any device 2025-06-09 13:16:24 +05:30
Pramod Mahajan
bc657eebca Fixed conditional rendering logic for Directory project nav item 2025-06-09 13:16:24 +05:30
c4288fe35a Comments popup submit button issue. 2025-06-09 13:16:24 +05:30
f6634eb527 Correction in Comment popup from Daily Progress Report. 2025-06-09 13:16:24 +05:30
Pramod Mahajan
763d81e3b1 added restrict access to Project > Directory tab to authorized users only 2025-06-09 13:14:06 +05:30
Pramod Mahajan
c78c136467 added directory feature 2025-06-09 13:14:06 +05:30
Pramod Mahajan
360f3b2352 Added props to hide component based on role; identifies if it's a page or component 2025-06-09 13:14:06 +05:30
Pramod Mahajan
0eaea6a232 added more option for sorting contact list - projectId 2025-06-09 13:14:05 +05:30
Pramod Mahajan
08ace9b5ba changed directory menu icon 2025-06-09 13:14:05 +05:30
Pramod Mahajan
7de4de9b32 loader, not found text moved in centered area 2025-06-09 13:14:05 +05:30
Pramod Mahajan
cd7422c991 changed restore icon 2025-06-09 13:14:05 +05:30
Pramod Mahajan
e739a380f7 chnaged badge type 2025-06-09 13:14:05 +05:30
Pramod Mahajan
2eee4a1f6a removed unused props 2025-06-09 13:14:05 +05:30
Pramod Mahajan
b0e3b767d3 display contact profile data 2025-06-09 13:14:05 +05:30
Pramod Mahajan
49a3bec527 Added id check before calling fetchContactNotes function 2025-06-09 13:14:05 +05:30
Pramod Mahajan
289f4063f9 Add restore feature for deleted notes 2025-06-09 13:14:04 +05:30
Pramod Mahajan
ffd23dc11c aded validation for tags and rename label to bucket 2025-06-09 13:14:04 +05:30
Pramod Mahajan
941e74fcbb removed new contact button form header 2025-06-09 13:14:04 +05:30
Pramod Mahajan
94daa0d4c2 changed table column email to role 2025-06-09 13:14:04 +05:30
Pramod Mahajan
755ea1b0ee added restore feature for contacts 2025-06-09 13:14:04 +05:30
Pramod Mahajan
0082a60e02 fixed console warning 2025-06-09 13:14:04 +05:30
Pramod Mahajan
7d3a7adf95 added wrapped DirProver for context 2025-06-09 13:14:04 +05:30
Pramod Mahajan
6d02511847 Support tag creation on spacebar key 2025-06-09 13:14:04 +05:30
Pramod Mahajan
1f8ba16447 changed useDirectory hook calling format 2025-06-09 13:14:04 +05:30
Pramod Mahajan
bae8b130de changed delete contact Url 2025-06-09 13:14:04 +05:30
Pramod Mahajan
a35e8b645b changed navigation tab layout 2025-06-09 13:14:03 +05:30
Pramod Mahajan
875ba214dd changed font size 2025-06-09 13:14:03 +05:30
Pramod Mahajan
bc220180c4 corrected state name, mismatched 2025-06-09 13:14:03 +05:30
Pramod Mahajan
8a57d3e978 added margin btwn bucket name in filter dropdwon 2025-06-09 13:14:03 +05:30
Pramod Mahajan
c9960a1273 Fixed case mismatch in error rendering (BucketIds ➝ bucketIds) 2025-06-09 13:14:03 +05:30
Pramod Mahajan
ddaba97c8f Prevent error by safely accessing bucket creator with optional chaining 2025-06-09 13:14:03 +05:30
Pramod Mahajan
14698e92fe added directory permission Ids 2025-06-09 13:14:03 +05:30
Pramod Mahajan
ec32d9160c added manager permission for directory 2025-06-09 13:14:03 +05:30
Pramod Mahajan
6346f132bd removed eaxtra gap between avatra and name 2025-06-09 13:14:03 +05:30
Pramod Mahajan
3dd901a81f modified not url 2025-06-09 13:14:02 +05:30
Pramod Mahajan
f9ad47ef54 user can update and assign bucket to emp 2025-06-09 13:14:02 +05:30
Pramod Mahajan
62a044261a modified table layout 2025-06-09 13:14:02 +05:30
Pramod Mahajan
3c75222dd7 added classAvatar for other classes 2025-06-09 13:14:02 +05:30
Pramod Mahajan
77e3082000 add auto suggestion field for orgnaization 2025-06-09 13:14:02 +05:30
Pramod Mahajan
db75cec8e7 modifled column size 2025-06-09 13:14:02 +05:30
Pramod Mahajan
a9f3b27cb3 added assign-bucket api 2025-06-09 13:14:02 +05:30
Pramod Mahajan
813032ead2 buckets can assign employee 2025-06-09 13:14:02 +05:30
Pramod Mahajan
eb6d4e413d added float button 2025-06-09 13:14:01 +05:30
Pramod Mahajan
16389bf102 modified useBucket for refetch data 2025-06-09 13:14:01 +05:30
Pramod Mahajan
a87d2c9143 added bucket fdisplay field in contact profile 2025-06-09 13:14:01 +05:30
Pramod Mahajan
2d1d32ee16 added refresh button 2025-06-09 13:14:01 +05:30
Pramod Mahajan
c77dc76079 rename method post to delete 2025-06-09 13:14:01 +05:30
Pramod Mahajan
04d64e57c9 wrapped in context FabContext 2025-06-09 13:14:01 +05:30
Pramod Mahajan
39ef265b56 added float contaxt , action can take form any component 2025-06-09 13:14:01 +05:30
Pramod Mahajan
cd487dee49 intergated delete api 2025-06-09 13:14:01 +05:30
Pramod Mahajan
fba983f41d added validation for bucket at least one bucket required 2025-06-09 13:14:00 +05:30
Pramod Mahajan
5ef8bed2b8 created new float button component 2025-06-09 13:14:00 +05:30
Pramod Mahajan
201a8881a5 added delete bucket api 2025-06-09 13:14:00 +05:30
Pramod Mahajan
ed489842c6 center empty state messages in employee table with spacing 2025-06-09 13:14:00 +05:30
Pramod Mahajan
24ffb82616 removed fixed height from select label field 2025-06-09 13:14:00 +05:30
Pramod Mahajan
0695fb6737 add card-minHeight class for consistent card sizing 2025-06-09 13:14:00 +05:30
Pramod Mahajan
45a300e540 added .card-minHeight class with 430px min-height 2025-06-09 13:14:00 +05:30
Pramod Mahajan
b4157354f7 added sorting button to table header 2025-06-09 13:13:59 +05:30
Pramod Mahajan
8f9bfcae6b created new hook for sorting table data 2025-06-09 13:13:59 +05:30
Pramod Mahajan
47ecbcdafd increased padding for suggestion menu 2025-06-09 13:13:59 +05:30
Pramod Mahajan
41d9db6fcc created new hook useOrganization 2025-06-09 13:13:59 +05:30
Pramod Mahajan
330ac0ff62 replaced standard input with custom InputSuggestions component for organization field 2025-06-09 13:13:59 +05:30
Pramod Mahajan
1b399c1ebf added marign for select item 2025-06-09 13:13:59 +05:30
Pramod Mahajan
360bfc5650 added mirgin form bottom for select badge 2025-06-09 13:13:59 +05:30
Pramod Mahajan
1d1f82feb6 created new component for organization sugger field 2025-06-09 13:13:59 +05:30
Pramod Mahajan
195adbeb72 removed table header icons 2025-06-09 13:13:59 +05:30
Pramod Mahajan
d32b954d94 removed table header icons 2025-06-09 13:13:58 +05:30
Pramod Mahajan
c7e308586a incresed modal width for manage buckets 2025-06-09 13:13:58 +05:30
Pramod Mahajan
df1838dbba added background color, backdrop 2025-06-09 13:13:58 +05:30
Pramod Mahajan
276c97a734 removed fix height 2025-06-09 13:13:58 +05:30
Pramod Mahajan
449debc0cf changed font size 2025-06-09 13:13:58 +05:30
Pramod Mahajan
560ee8fe27 removed project select validation, it no longer required 2025-06-09 13:13:58 +05:30
Pramod Mahajan
dd0ec9d018 changed font-size 2025-06-09 13:13:58 +05:30
Pramod Mahajan
30b27ed2bb added filter action while apply filter 2025-06-09 13:13:58 +05:30
Pramod Mahajan
ee9c80749f added API methods for creating and updating directory buckets 2025-06-09 13:13:58 +05:30
Pramod Mahajan
2fc4db1f87 splited Directory component into smaller components 2025-06-09 13:13:57 +05:30
Pramod Mahajan
7a8bbaf561 added new modal for bucket management and splited code 2025-06-09 13:13:57 +05:30
Pramod Mahajan
3ff8066803 created new component for bucket managment 2025-06-09 13:13:57 +05:30
Pramod Mahajan
a965116aa5 added schema for bucket form validation 2025-06-09 13:13:57 +05:30
Pramod Mahajan
5a701ca9d7 added EditcontactCatgorry component in modal for update 2025-06-09 13:13:57 +05:30
Pramod Mahajan
ded8ab7752 created new component for update contact category 2025-06-09 13:13:33 +05:30
Pramod Mahajan
6a8332b606 modified url endpoint 2025-06-09 13:13:33 +05:30
Pramod Mahajan
51e48e632a modified url for delete and update contact tag 2025-06-09 13:13:02 +05:30
Pramod Mahajan
8999d7bb47 added new modal for edit contact tag and delete contact tag 2025-06-09 13:13:02 +05:30
Pramod Mahajan
5e3c833ca6 added new component for Edit contact Tag 2025-06-09 13:13:02 +05:30
Pramod Mahajan
3f5b79dc5c no more need 2025-06-09 13:13:02 +05:30
Pramod Mahajan
f748eecf14 added feature active and inactive not displays 2025-06-09 13:13:02 +05:30
Pramod Mahajan
df5c2e4397 modified table column, if inactive contacts hide action column 2025-06-09 13:13:01 +05:30
Pramod Mahajan
0d09bfda04 added in List view active or inactive contacts 2025-06-09 13:13:01 +05:30
Pramod Mahajan
1b575a7d5f added on more params - active 2025-06-09 13:13:01 +05:30
Pramod Mahajan
17cceeb97c modified display active as well as inactives contact 2025-06-09 13:13:01 +05:30
Pramod Mahajan
eb8140ebac modified GetContact method of taking parma active or inactive 2025-06-09 13:13:01 +05:30
Pramod Mahajan
c089ee47cf modified enable option only active contact 2025-06-09 13:13:01 +05:30
Pramod Mahajan
6010e630e8 modified hook, for taking active or incative params 2025-06-09 13:13:01 +05:30
Pramod Mahajan
0d249c7cdb display not found msg if data is empty 2025-06-09 13:13:01 +05:30
Pramod Mahajan
5fd6f26653 correct note added time 2025-06-09 13:13:01 +05:30
Pramod Mahajan
2643bbbe59 split common use fun in util file 2025-06-09 13:13:00 +05:30
Pramod Mahajan
d40d4c59f2 created separet util. fun file for directory components 2025-06-09 13:13:00 +05:30
Pramod Mahajan
bfba4133f4 pin bucket name on card 2025-06-09 13:13:00 +05:30
Pramod Mahajan
31ca02fcd8 modified filter functionality- added apply call function button 2025-06-09 13:13:00 +05:30
Pramod Mahajan
105b5c6dcc changed filter name 2025-06-09 13:13:00 +05:30
Pramod Mahajan
2607f852fb implement contact deletion with confirmation and toast feedback 2025-06-09 13:13:00 +05:30
Pramod Mahajan
54de8df956 added delete contact api 2025-06-09 13:13:00 +05:30
Pramod Mahajan
4e19c2a547 add side-by-side filtering UI for Buckets and Categories with flex layout 2025-06-09 13:13:00 +05:30
Pramod Mahajan
43b1b1ffe2 added filtering by category and buckets 2025-06-09 13:13:00 +05:30
Pramod Mahajan
c784d18427 updated cache 2025-06-09 13:12:59 +05:30
Pramod Mahajan
0e38709435 removed tab 2025-06-09 13:12:59 +05:30
Pramod Mahajan
4f70d8cb17 changed toolbar position bottom to top 2025-06-09 13:12:59 +05:30
Pramod Mahajan
24d8688069 unneeded margin removed 2025-06-09 13:12:59 +05:30
Pramod Mahajan
5a3dbe466f added delete not method inside driectoryrepository 2025-06-09 13:12:59 +05:30
Pramod Mahajan
76bbfee4fc adjust modal close button appearance and position 2025-06-09 13:12:59 +05:30
Pramod Mahajan
3e251b3d47 edit, delete option to dropdown icon size changed -sm 2025-06-09 13:12:58 +05:30
Pramod Mahajan
dcc17dea0c apply loading for card view 2025-06-09 13:12:58 +05:30
Pramod Mahajan
37066904e3 set text-primary color for add email icon 2025-06-09 13:12:58 +05:30
Pramod Mahajan
0c44ae76f8 removed phone and emaill required validation 2025-06-09 13:12:58 +05:30
Pramod Mahajan
2688c95f47 installed react-quill package and customize using new component Editor 2025-06-09 13:12:58 +05:30
Pramod Mahajan
8f6c4b0814 chanages class to className 2025-06-09 13:12:58 +05:30
Pramod Mahajan
7d489d177d repaced class to className 2025-06-09 13:12:58 +05:30
Pramod Mahajan
d9053837a6 set up triggle for open contact profile modal 2025-06-09 13:12:58 +05:30
Pramod Mahajan
7feaac1a94 Replaced buttons with icon-only UI for cleaner layout and smaller size 2025-06-09 13:12:58 +05:30
Pramod Mahajan
e3cfc1c073 addded new component for profile contact , that open in modal for adding notes 2025-06-09 13:12:57 +05:30
Pramod Mahajan
1a7636ad82 Replaced buttons with icon-only UI for cleaner layout and smaller size 2025-06-09 13:12:57 +05:30
Pramod Mahajan
96d1fd648f created separated editor component for customize react-quill 2025-06-09 13:12:57 +05:30
Pramod Mahajan
f9c3c136b3 created useContactNote hook 2025-06-09 13:12:57 +05:30
Pramod Mahajan
93c0961751 added GetNot,CreateNote,UpdateNote inside DirectoryRepository 2025-06-09 13:12:57 +05:30
Pramod Mahajan
0fc460b38f set up props variable close button display or not 2025-06-09 13:12:57 +05:30
Pramod Mahajan
7514e73d0c created new method for directoryRepository - CreateNote 2025-06-09 13:12:57 +05:30
Pramod Mahajan
038ff416e1 added new method for DirectoryRepository- GetContactProfile 2025-06-09 13:12:57 +05:30
Pramod Mahajan
69abe1bd42 added new hook - useContactProfile 2025-06-09 13:12:57 +05:30
Pramod Mahajan
3a6be65a48 replace add phone & email button with icon-only element for cleaner UI 2025-06-09 13:12:57 +05:30
Pramod Mahajan
597fa279ea chnaged checkbox color 2025-06-09 13:12:56 +05:30
Pramod Mahajan
61f0703096 text-wrap for organization column value 2025-06-09 13:12:56 +05:30
Pramod Mahajan
a9a5206062 use ITEM_PER_PAGE constant to standardize pagination 2025-06-09 13:12:56 +05:30
Pramod Mahajan
75897a2ab4 added key for listviewdirectory 2025-06-09 13:11:00 +05:30
Pramod Mahajan
1300ea33b6 removed selected 2025-06-09 13:11:00 +05:30
Pramod Mahajan
6cad6ac6e8 removed selected 2025-06-09 13:11:00 +05:30
Pramod Mahajan
2d84b489f5 removed key attribute 2025-06-09 13:11:00 +05:30
Pramod Mahajan
7b2a94b5a4 passes props inside CardViewDirectory for open edit modal 2025-06-09 13:11:00 +05:30
Pramod Mahajan
a6a4435a77 chanaged icons 2025-06-09 13:11:00 +05:30
Pramod Mahajan
bc50e58150 added fun as props to open edit modal 2025-06-09 13:10:59 +05:30
Pramod Mahajan
f8f43b62c6 restore page scroll after modal is closed 2025-06-09 13:10:59 +05:30
Pramod Mahajan
dbc1ae2c63 set default list view 2025-06-09 13:10:59 +05:30
Pramod Mahajan
76ce07d4d3 it send properly existen phone and email id if existen data 2025-06-09 13:10:59 +05:30
Pramod Mahajan
65319cac7d removed header - icon 2025-06-09 13:10:59 +05:30
Pramod Mahajan
6fec5b68e3 added avatar 2025-06-09 13:10:59 +05:30
Pramod Mahajan
41494a0816 modified phone no validation, accept upto min 6 and max 13 2025-06-09 13:10:59 +05:30
Pramod Mahajan
4753117d7b added avatar for name 2025-06-09 13:10:59 +05:30
Pramod Mahajan
bb6aaeee18 updated state for reflacte immediately update in rendered UI 2025-06-09 13:10:58 +05:30
Pramod Mahajan
bef8a28db2 added category filter and search 2025-06-09 13:10:58 +05:30
Pramod Mahajan
f11f358f49 increased width of name coulmn 2025-06-09 13:10:58 +05:30
Pramod Mahajan
65f1d32bb8 added new component for card View directory-contacts 2025-06-09 13:10:58 +05:30
Pramod Mahajan
7c67af41c3 Uncommented reset logic on component unmount for cleanup 2025-06-09 13:10:58 +05:30
Pramod Mahajan
b082aa370b Re-enabled submit and reset logic, removed console log 2025-06-09 13:10:58 +05:30
Pramod Mahajan
15967ce2fc prevent to reset form before calling api. 2025-06-09 13:10:58 +05:30
Pramod Mahajan
c83960c040 added new method for update contact 2025-06-09 13:10:58 +05:30
Pramod Mahajan
d10cbdd4bd added update contact modal 2025-06-09 13:10:57 +05:30
Pramod Mahajan
42b769c1b5 created separate contactCategory and contactTag hook for managing contacts creation and edition 2025-06-09 13:10:57 +05:30
Pramod Mahajan
ada8856b3b removed console 2025-06-09 13:10:57 +05:30
Pramod Mahajan
86e9854071 modified hook prevent to recall api 2025-06-09 13:10:57 +05:30
Pramod Mahajan
ba04e041b8 created new component for update contact 2025-06-09 13:10:57 +05:30
Pramod Mahajan
3d43facdae modified as per required changes. 2025-06-09 13:10:57 +05:30
Pramod Mahajan
3e1f93d4f1 added new props, for triggering for open modal 2025-06-09 13:10:57 +05:30
Pramod Mahajan
09b1664ac7 created new file for directory form schema 2025-06-09 13:10:57 +05:30
Pramod Mahajan
f62129e3ac modfified TagInput for prevent multiple rendering 2025-06-09 13:10:57 +05:30
Pramod Mahajan
cdec17735f created new component SelectMultiple items 2025-06-09 13:10:56 +05:30
Pramod Mahajan
8ece56da52 created style file SelectMultiple component 2025-06-09 13:10:56 +05:30
Pramod Mahajan
22dc355f7d added style for Tag list 2025-06-09 13:10:56 +05:30
Pramod Mahajan
f7c9c7c7ff added create contact and get bucket api in Directory repo 2025-06-09 13:10:56 +05:30
Pramod Mahajan
02492b0405 called submit function inside Directory component from manageDirectory 2025-06-09 13:10:56 +05:30
Pramod Mahajan
283e13985d created new contact form 2025-06-09 13:10:56 +05:30
Pramod Mahajan
a319171674 added useBuckets hook and set up cached data if have 2025-06-09 13:10:56 +05:30
Pramod Mahajan
07a402d28d changed coulmn 2025-06-09 13:10:56 +05:30
Pramod Mahajan
354c653240 modified TagInput, for array an object 2025-06-09 13:10:56 +05:30
Pramod Mahajan
33f6220622 removed backdrop 2025-06-09 13:10:55 +05:30
Pramod Mahajan
e8504c6627 integrated Contact Tag list API and display in master table 2025-06-09 13:10:55 +05:30
Pramod Mahajan
5b3b6904bf updated incorrect API endpoint 2025-06-09 13:10:55 +05:30
Pramod Mahajan
1e3a1f0365 feat: integrate Get Contact List API in useMaster hook 2025-06-09 13:10:55 +05:30
Pramod Mahajan
8d7fcc62a7 added createContactTg component inside MasterModal 2025-06-09 13:10:55 +05:30
Pramod Mahajan
5836a24aed created new createContactMaster component 2025-06-09 13:10:55 +05:30
Pramod Mahajan
8c0ab1102b added Tag master inside masterList 2025-06-09 13:10:55 +05:30
Pramod Mahajan
b4081e73bf created new repo for tag and contact category mastes 2025-06-09 13:10:55 +05:30
Pramod Mahajan
a3428fed85 added CreateContactCategory in master modal 2025-06-09 13:10:55 +05:30
Pramod Mahajan
bf0af60c47 created new constact category master 2025-06-09 13:10:55 +05:30
Pramod Mahajan
cecff08ba2 added one more master in masterList - Contact Category 2025-06-09 13:10:54 +05:30
Pramod Mahajan
8c15cacc04 display contact in list view 2025-06-09 13:10:54 +05:30
Pramod Mahajan
3393eaf48d displaye contacts in List View 2025-06-09 13:10:54 +05:30
Pramod Mahajan
c672e44c76 created new hook for get a contacts 2025-06-09 13:10:54 +05:30
Pramod Mahajan
a1e75bf7dd created new repo for get contact list 2025-06-09 13:10:54 +05:30
655db6ac74 Merge pull request 'Added Column Today's Planned to Project Infrastructure' (#182) from Ashutosh_Enhancement#276_TodaysPlanned into Issue_Jun_1W
Reviewed-on: #182
2025-06-03 11:59:46 +00:00
176535f53f Added Column Today's Planned to Project Infrastructure 2025-06-03 11:59:46 +00:00
cfd5486fe2 Merge pull request 'In Teams Tab when we Assign a project then this dropdown not change its state .' (#181) from Kartik_Bug#442 into Issue_Jun_1W
Reviewed-on: #181
2025-06-03 11:56:04 +00:00
3486a6bc3a In Teams Tab when we Assign a project then this dropdown not change its state . 2025-06-03 11:56:04 +00:00
412125e422 Merge pull request 'Adding a error message on InActive selection on Teams tab on Projects.' (#180) from Kartik_Bug#441 into Issue_Jun_1W
Reviewed-on: #180
2025-06-03 11:54:33 +00:00
cf8a67bc2c Adding a error message on InActive selection on Teams tab on Projects. 2025-06-03 11:54:33 +00:00
18d848b697 Merge pull request 'In Report popup when we take value = 0 then giv error but now it is resolved.' (#179) from Kartik_Bug#436 into Issue_Jun_1W
Reviewed-on: #179
2025-06-03 11:53:32 +00:00
78bc8802d7 Merge pull request 'In Employee Management when we select Project then this toggle button will be disabled.' (#178) from Kartik_Bug#432 into Issue_Jun_1W
Reviewed-on: #178
2025-06-03 11:52:53 +00:00
5df397488a In Employee Management when we select Project then this toggle button will be disabled. 2025-06-03 11:52:53 +00:00
4d1d3f8cca Merge pull request 'Display completion percentage for each Work Area header' (#174) from pramod_Task-#438 into Issue_Jun_1W
Reviewed-on: #174
2025-06-03 11:47:18 +00:00
493689fb1a Add progress bar for work area on Infra Page 2025-06-03 11:47:18 +00:00
Pramod Mahajan
80d3434bbf Display completion percentage for each Work Area header 2025-06-03 11:47:18 +00:00
346e7b1d1d Merge pull request 'In Employee selection double Date is shown in Front.' (#173) from Kartik_Bug#345 into Issue_Jun_1W
Reviewed-on: #173
2025-06-03 10:44:27 +00:00
b697943787 In Report popup when we take value = 0 then giv error but now it is resolved. 2025-06-03 11:11:00 +05:30
7e05cfbd61 In Employee selection double Date is shown in Front. 2025-06-02 17:31:07 +05:30
12 changed files with 289 additions and 80 deletions

View File

@ -21,7 +21,7 @@ export const ReportTask = ({ report, closeModal, refetch }) => {
required_error: "Completed Work must be a number",
invalid_type_error: "Completed Work must be a number",
})
.min(1, "Completed Work must be greater than 0")
.min(0, "Completed Work must be greater than 0")
.max(maxPending, {
message: `Completed task cannot exceed total pending tasks: ${maxPending}`,
})

View File

@ -0,0 +1,79 @@
import React from "react";
import ReactApexChart from "react-apexcharts";
const ProgressDonutChart = ({ completed = 0, planned = 1 }) => {
const percentage = planned > 0 ? Math.round((completed / planned) * 100) : 0;
const options = {
chart: {
height: 10,
type: "radialBar",
toolbar: { show: false },
},
plotOptions: {
radialBar: {
startAngle: 0,
endAngle: 360,
hollow: {
margin: 0,
size: "10%",
background: "#fff",
dropShadow: {
enabled: true,
top: 0,
left: 0,
blur: 3,
opacity: 0.45,
},
},
track: {
background: "#f5f5f5",
strokeWidth: "10%",
dropShadow: { enabled: false },
},
dataLabels: {
show: true,
name: {
offsetY: -10,
color: "#888",
fontSize: "14px",
},
value: {
formatter: (val) => `${val}%`,
color: "#111",
fontSize: "11px",
show: true,
},
},
},
},
fill: {
type: "gradient",
gradient: {
shade: "dark",
type: "horizontal",
shadeIntensity: 0.5,
gradientToColors: ["#ABE5A1"],
opacityFrom: 1,
opacityTo: 1,
stops: [0, 100],
},
},
stroke: {
lineCap: "round",
},
};
return (
<div id="chart">
<ReactApexChart
options={options}
series={[percentage]}
type="radialBar"
height={100}
/>
</div>
);
};
export default ProgressDonutChart;

View File

@ -5,12 +5,13 @@ import useMaster from "../../hooks/masterHook/useMaster";
import { useForm, Controller } from "react-hook-form";
import { z } from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import { getCachedData } from "../../slices/apiDataManager";
import { clearCacheKey, getCachedData } from "../../slices/apiDataManager";
import { useEmployeesAllOrByProjectId } from "../../hooks/useEmployees";
import { TasksRepository } from "../../repositories/ProjectRepository";
import showToast from "../../services/toastService";
import { useProjectDetails } from "../../hooks/useProjects";
const AssignRoleModel = ({ assignData, onClose }) => {
const AssignRoleModel = ({ assignData, onClose, setAssigned }) => {
// Calculate maxPlanned based on assignData
const maxPlanned =
assignData?.workItem?.workItem?.plannedWork -
@ -50,11 +51,11 @@ const AssignRoleModel = ({ assignData, onClose }) => {
// Initialize Bootstrap Popovers on component mount
useEffect(() => {
// Check if Bootstrap is available globally
if (typeof bootstrap !== 'undefined') {
if (typeof bootstrap !== "undefined") {
if (infoRef.current) {
new bootstrap.Popover(infoRef.current, {
trigger: 'focus',
placement: 'right',
trigger: "focus",
placement: "right",
html: true,
content: `<div>Total Pending tasks of the Activity</div>`,
});
@ -62,8 +63,8 @@ const AssignRoleModel = ({ assignData, onClose }) => {
if (infoRef1.current) {
new bootstrap.Popover(infoRef1.current, {
trigger: 'focus',
placement: 'right',
trigger: "focus",
placement: "right",
html: true,
content: `<div>Target task for today</div>`,
});
@ -72,7 +73,6 @@ const AssignRoleModel = ({ assignData, onClose }) => {
console.warn("Bootstrap is not available. Popovers might not function.");
}
}, []); // Empty dependency array ensures this runs once on mount
// Redux state and hooks
const selectedProject = useSelector(
(store) => store.localVariables.projectId
@ -173,6 +173,8 @@ const AssignRoleModel = ({ assignData, onClose }) => {
await TasksRepository.assignTask(formattedData);
showToast("Task Successfully Assigned", "success"); // Show success toast
reset(); // Reset form fields
clearCacheKey("projectInfo");
setAssigned(formattedData.plannedTask)
onClose(); // Close the modal
} catch (error) {
console.error("Error assigning task:", error); // Log the full error for debugging
@ -205,7 +207,7 @@ const AssignRoleModel = ({ assignData, onClose }) => {
<div className="mb-1">
<p className="mb-0">
<span className="text-dark text-start d-flex align-items-center flex-wrap form-text">
<p className="me-2 m-0 font-bold">Work Location :</p>
<span className="me-2 m-0 font-bold">Work Location :</span>
{[
assignData?.building?.name,
assignData?.floor?.floorName,
@ -303,7 +305,9 @@ const AssignRoleModel = ({ assignData, onClose }) => {
type="checkbox"
id={`employee-${emp?.id}`}
value={emp.id}
checked={field.value?.includes(emp.id)}
checked={field.value?.includes(
emp.id
)}
onChange={(e) => {
handleCheckboxChange(e, emp);
}}
@ -311,7 +315,10 @@ const AssignRoleModel = ({ assignData, onClose }) => {
)}
/>
<div className="flex-grow-1">
<p className="mb-0" style={{ fontSize: "13px" }}>
<p
className="mb-0"
style={{ fontSize: "13px" }}
>
{emp.firstName} {emp.lastName}
</p>
<small
@ -333,7 +340,9 @@ const AssignRoleModel = ({ assignData, onClose }) => {
})
) : (
<div className="col-12">
<p className="text-center">No employees found for the selected role.</p>
<p className="text-center">
No employees found for the selected role.
</p>
</div>
)}
</div>
@ -387,23 +396,37 @@ const AssignRoleModel = ({ assignData, onClose }) => {
{!loading && errors.selectedEmployees && (
<div className="danger-text mt-1">
<p>{errors.selectedEmployees.message}</p> {/* Use message from Zod schema */}
<p>{errors.selectedEmployees.message}</p>{" "}
{/* Use message from Zod schema */}
</div>
)}
{/* Pending Task of Activity section */}
<div className="col-md text-start mx-0 px-0">
<div className="form-check form-check-inline mt-3 px-1">
<label className="form-text text-dark align-items-center d-flex" htmlFor="inlineCheckbox1">
<label
className="form-text text-dark align-items-center d-flex"
htmlFor="inlineCheckbox1"
>
Pending Task of Activity :
<label className="form-check-label fs-7 ms-4" htmlFor="inlineCheckbox1">
<label
className="form-check-label fs-7 ms-4"
htmlFor="inlineCheckbox1"
>
<strong>
{assignData?.workItem?.workItem?.plannedWork - assignData?.workItem?.workItem?.completedWork}
{assignData?.workItem?.workItem?.plannedWork -
assignData?.workItem?.workItem?.completedWork}
</strong>{" "}
<u>{assignData?.workItem?.workItem?.activityMaster?.unitOfMeasurement}</u>
<u>
{
assignData?.workItem?.workItem?.activityMaster
?.unitOfMeasurement
}
</u>
</label>
<div style={{ display: "flex", alignItems: "center" }}>
<div
style={{ display: "flex", alignItems: "center" }}
>
<div
ref={infoRef}
tabIndex="0"
@ -439,10 +462,14 @@ const AssignRoleModel = ({ assignData, onClose }) => {
className="text-dark text-start d-flex align-items-center flex-wrap form-text"
htmlFor="inlineCheckbox1"
>
<span>Target for Today</span>&nbsp;<span style={{ marginLeft: '46px' }}>:</span>
<span>Target for Today</span>&nbsp;
<span style={{ marginLeft: "46px" }}>:</span>
</label>
</div>
<div className="form-check form-check-inline col-sm-3 mt-2" style={{ marginLeft: '-28px' }}>
<div
className="form-check form-check-inline col-sm-3 mt-2"
style={{ marginLeft: "-28px" }}
>
<Controller
name="plannedTask"
control={control}
@ -455,10 +482,18 @@ const AssignRoleModel = ({ assignData, onClose }) => {
id="defaultFormControlInput"
aria-describedby="defaultFormControlHelp"
/>
<span style={{ paddingLeft: '6px' }}>
{assignData?.workItem?.workItem?.activityMaster?.unitOfMeasurement}
<span style={{ paddingLeft: "6px" }}>
{
assignData?.workItem?.workItem?.activityMaster
?.unitOfMeasurement
}
</span>
<div style={{ display: "flex", alignItems: "center" }}>
<div
style={{
display: "flex",
alignItems: "center",
}}
>
<div
ref={infoRef1}
tabIndex="0"
@ -489,16 +524,20 @@ const AssignRoleModel = ({ assignData, onClose }) => {
</div>
{errors.plannedTask && (
<div className="danger-text mt-1">{errors.plannedTask.message}</div>
<div className="danger-text mt-1">
{errors.plannedTask.message}
</div>
)}
{isHelpVisible && (
<div
className="position-absolute bg-white border p-2 rounded shadow"
style={{ zIndex: 10, marginLeft: '10px' }}
style={{ zIndex: 10, marginLeft: "10px" }}
>
{/* Add your help content here */}
<p className="mb-0">Enter the target value for today's task.</p>
<p className="mb-0">
Enter the target value for today's task.
</p>
</div>
)}
</div>

View File

@ -13,10 +13,10 @@ const Floor = ({ floor, workAreas, forBuilding }) => {
/>
))
) : (
<tr>
<tr>
<td colSpan="4" className="text-start table-cell">
<div className="row ps-2">
{/* <div className="col-1 col-md-1 d-flex justify-content-between align-items-center " >
<div className="row ps-2">
{/* <div className="col-1 col-md-1 d-flex justify-content-between align-items-center " >
<button
className="btn me-2"
>
@ -25,7 +25,7 @@ const Floor = ({ floor, workAreas, forBuilding }) => {
</div> */}
<div className="col-12 ps-8">
<div className="row">
<div className="col">
<div className="d-flex col-5">
{" "}
<span className="fw-semibold text-primary">
Floor:&nbsp;
@ -34,6 +34,13 @@ const Floor = ({ floor, workAreas, forBuilding }) => {
{floor.floorName}
</span>
</div>
<div className="text-start col-5">
{" "}
<span className="fw-semibold text-primary">
Work Area:&nbsp;
</span>{" "}
<span className="fw-normal text-danger">Not Available</span>
</div>
</div>
</div>
</div>

View File

@ -68,7 +68,6 @@ const InfraTable = ({ buildings }) => {
showToast("Failed to save floor", "error");
}
} catch (err) {
showToast("Error occurred while saving floor", "error");
}
};
@ -95,14 +94,14 @@ const InfraTable = ({ buildings }) => {
No floors have been added yet. Start by adding floors to manage
this building.
</p>
<button
{/* <button
type="button"
className="btn btn-xs btn-primary"
onClick={() => handleAddFloor(building)}
>
<i className="bx bx-plus-circle me-2"></i>
Add Floors
</button>
</button> */}
</div>
</td>
</tr>

View File

@ -6,20 +6,46 @@ import { useDispatch } from "react-redux";
import { refreshData } from "../../../slices/localVariablesSlice";
import ProjectRepository from "../../../repositories/ProjectRepository";
import showToast from "../../../services/toastService";
import {useHasUserPermission} from "../../../hooks/useHasUserPermission";
import {ASSIGN_REPORT_TASK, MANAGE_PROJECT_INFRA, MANAGE_TASK} from "../../../utils/constants";
import {useParams} from "react-router-dom";
import { useHasUserPermission } from "../../../hooks/useHasUserPermission";
import {
ASSIGN_REPORT_TASK,
MANAGE_PROJECT_INFRA,
MANAGE_TASK,
} from "../../../utils/constants";
import { useParams } from "react-router-dom";
import ProgressDonutChart from "../../Charts/ProgressDonutChart";
import ProgressBar from "../../common/ProgressBar";
import { componentsToColor } from "pdf-lib";
const WorkArea = ({ workArea, floor, forBuilding }) => {
const [workItems, setWorkItems] = useState([]);
const dispatch = useDispatch();
const [ Project, setProject ] = useState();
const {projectId} = useParams();
const ManageTasks = useHasUserPermission(MANAGE_TASK);
const ManageInfra = useHasUserPermission(MANAGE_PROJECT_INFRA);
const ManageAndAssignTak = useHasUserPermission( ASSIGN_REPORT_TASK );
const [Project, setProject] = useState();
const { projectId } = useParams();
const ManageTasks = useHasUserPermission(MANAGE_TASK);
const ManageInfra = useHasUserPermission(MANAGE_PROJECT_INFRA);
const ManageAndAssignTak = useHasUserPermission(ASSIGN_REPORT_TASK);
const [workAreaStatus, setWorkAreaStatus] = useState({
completed: 0,
planned: 100,
});
useEffect(() => {
const totalCompleted = workItems.reduce(
(sum, i) => sum + (i.workItem?.completedWork || 0),
0
);
const totalPlanned = workItems.reduce(
(sum, i) => sum + (i.workItem?.plannedWork || 0),
0
);
const percent =
totalPlanned > 0 ? (totalCompleted / totalPlanned) * 100 : 0;
//setPercentComplete(Math.min(percent, 100)); // cap at 100%
setWorkAreaStatus({ completed: totalCompleted, planned: totalPlanned });
}, [workItems]);
useEffect(() => {
const project = getCachedData("projectInfo");
@ -153,21 +179,32 @@ const WorkArea = ({ workArea, floor, forBuilding }) => {
}}
></i>
<div className="d-flex justify-content-start gap-12">
<div className="d-flex">
<span className="fw-semibold small">Floor:&nbsp;</span>
<span className="fw-normal text-darkgreen small">
<div className="d-flex justify-content-start row w-100 align-items-center">
<div className="d-flex col-5">
<span className="fw-semibold text-primary small">
Floor:
</span>
<span className="fw-normal text-darkgreen small px-2">
{floor.floorName}
</span>
</div>
<div className="text-start ">
<div className="text-start col-5">
<span className="fw-semibold text-primary small">
Work Area:&nbsp;
Work Area:
</span>
<span className="fw-normal text-darkgreen small">
<span className="fw-normal text-darkgreen small px-2">
{workArea.areaName}
</span>
</div>
{workArea?.workItems?.length > 0 && (
<div className="col-2">
<ProgressBar
completedWork={workAreaStatus.completed}
plannedWork={workAreaStatus.planned}
className="m-0 text-info"
></ProgressBar>
</div>
)}
</div>
</button>
</p>
@ -195,10 +232,14 @@ const WorkArea = ({ workArea, floor, forBuilding }) => {
<th className="infra-activity-table-header d-none d-md-table-cell">
Completed/Planned
</th>
<th className="infra-activity-table-header d-none d-md-table-cell">
Today's Planned
</th>
<th className="infra-activity-table-header">
Progress
</th>
{( ManageInfra || ( !projectId && ManageAndAssignTak ) ) && (
{(ManageInfra ||
(!projectId && ManageAndAssignTak)) && (
<th className="infra-activity-table-header text-end">
<span className="px-2">Actions</span>
</th>

View File

@ -21,7 +21,6 @@ import { useDispatch } from "react-redux";
import { refreshData } from "../../../slices/localVariablesSlice";
const WorkItem = ({
key,
workItem,
forBuilding,
forFloor,
@ -55,6 +54,15 @@ const WorkItem = ({
setNewWorkItem(workItem);
}, [workItem]);
const refreshWorkItem = (plannedTask) =>{
if (workItem) {
const updated = {
...workItem,
todaysAssigned: (workItem.todaysAssigned || 0) + plannedTask,
};
setNewWorkItem(updated);
}
}
let assigndata = {
building: forBuilding,
floor: forFloor,
@ -97,7 +105,7 @@ const WorkItem = ({
style={{ display: isModalOpen ? "block" : "none" }}
aria-hidden={!isModalOpen}
>
<AssignRoleModel assignData={assigndata} onClose={closeModal} />
<AssignRoleModel assignData={assigndata} onClose={closeModal} setAssigned={refreshWorkItem} />
</div>
)}
@ -141,7 +149,7 @@ const WorkItem = ({
</div>
)}
<tr key={key}>
<tr key={NewWorkItem?.workItemId}>
{/* Activity Name - always visible */}
<td className="text-start table-cell-small">
<i className="bx bx-right-arrow-alt"></i>
@ -191,6 +199,16 @@ const WorkItem = ({
: "NA"}
</td>
<td className="text-center d-none d-md-table-cell">
{hasWorkItem
? `${
NewWorkItem?.todaysAssigned ??
workItem?.todaysAssigned ??
"0"
}`
: "NA"}
</td>
{/* Progress Bar - always visible */}
<td className="text-center " style={{ width: "15%" }}>
<div className="progress p-0">

View File

@ -90,18 +90,26 @@ const Teams = ({ project }) => {
};
const handleEmpAlicationFormSubmit = (allocaionObj) => {
let items = allocaionObj.map((item) => {
return {
empID: item.empID,
jobRoleId: item.jobRoleId,
projectId: project.id,
status: true,
};
});
let items = allocaionObj.map((item) => {
return {
empID: item.empID,
jobRoleId: item.jobRoleId,
projectId: project.id,
status: true,
};
});
submitAllocations(items, true);
// Force switch to active view after assignment
setActiveEmployee(true);
setFilteredEmployees(employees.filter((emp) => emp.isActive));
// Also update dropdown select if needed
const dropdown = document.querySelector('select[name="DataTables_Table_0_length"]');
if (dropdown) dropdown.value = "true";
};
submitAllocations( items ,true);
};
const getRole = (jobRoleId) => {
if (loading) return "Loading...";
@ -333,8 +341,12 @@ const Teams = ({ project }) => {
</tbody>
</table>
)}
{(!employeeLodaing && employees.length == 0 )&& (
<span>No employees assigned to the project</span>
{!employeeLodaing && filteredEmployees.length === 0 && (
<div className="text-center text-muted py-3">
{activeEmployee
? "No active employees assigned to the project"
: "No inactive employees assigned to the project"}
</div>
)}
</div>
</div>

View File

@ -25,7 +25,6 @@ const MasterModal = ({ modaldata, closeModal }) => {
const handleSelectedMasterDeleted = async () =>
{
const deleteFn = MasterRespository[modaldata.masterType];
if (!deleteFn) {
showToast(`No delete strategy defined for master type`,"error");
return false;
@ -140,7 +139,7 @@ const MasterModal = ({ modaldata, closeModal }) => {
{modaldata.modalType === "Contact Tag" && (
<CreateContactTag data={modaldata.item} onClose={closeModal} />
)}
{modaldata.modalType === "Edit-Contact Tag" && (
{modaldata.modalType === "Edit-Contact Tag" && (
<EditContactTag data={modaldata.item} onClose={closeModal} />
)}
</div>

View File

@ -59,13 +59,28 @@ const AttendancesEmployeeRecords = ({ employee }) => {
.sort(sortByName);
const group5 = data.filter((d) => d.activity === 5).sort(sortByName);
const sortedFinalList = [
...group1,
...group2,
...group3,
...group4,
...group5,
];
// const sortedFinalList = [
// ...group1,
// ...group2,
// ...group3,
// ...group4,
// ...group5,
// ];
const uniqueMap = new Map();
[...group1, ...group2, ...group3, ...group4, ...group5].forEach((rec) => {
const date = moment(rec.checkInTime || rec.checkOutTime).format("YYYY-MM-DD");
const key = `${rec.employeeId}-${date}`;
const existing = uniqueMap.get(key);
if (!existing || new Date(rec.checkInTime || rec.checkOutTime) > new Date(existing.checkInTime || existing.checkOutTime)) {
uniqueMap.set(key, rec);
}
});
const sortedFinalList = [...uniqueMap.values()].sort((a, b) =>
new Date(b.checkInTime || b.checkOutTime) - new Date(a.checkInTime || a.checkOutTime)
);
const currentDate = new Date().toLocaleDateString("en-CA");
const { currentPage, totalPages, currentItems, paginate } = usePagination(

View File

@ -398,7 +398,7 @@ const EmployeeList = () => {
</div>
</div>
</div>
<div className="text-end mb-2">
<div className={`text-end mb-2 ${selectedProject ? 'd-none' : ''}`}>
<label className="switch switch-primary">
<input
type="checkbox"

View File

@ -41,7 +41,7 @@ export const MasterRespository = {
"Activity": ( id ) => api.delete( `/api/master/activity/delete/${ id }` ),
"Application Role":(id)=>api.delete(`/api/roles/${id}`),
"Work Category": ( id ) => api.delete( `api/master/work-category/${ id }` ),
"Contact Category": ( id ) => api.delete( `/api/master/contact-category/${id}` ),
"Contact Category": ( id ) => api.delete( `/api/master/contact-category` ),
"Contact Tag" :(id)=>api.delete(`/api/master/contact-tag/${id}`),
getWorkCategory:() => api.get(`/api/master/work-categories`),