Compare commits

...

504 Commits

Author SHA1 Message Date
d5e7d38101 Merge pull request 'Feature_Directory' (#90) from Feature_Directory into main
Reviewed-on: #90
2025-06-10 14:44:35 +00:00
db49522756 Merge pull request 'Introduces a new column to the Project database table.' (#91) from Ashutosh_Enhancement#496_ShortName into main
Reviewed-on: #91
2025-06-10 14:20:38 +00:00
3f18371330 FIxed issues invalid validation 2025-06-10 16:52:01 +05:30
7689d2d235 Introduces a new column to the Project database table. 2025-06-10 16:40:46 +05:30
b61caa9ee7 Fixed rebase confilets 2025-06-09 20:22:36 +05:30
6df8148f40 Fixed rebase 2025-06-09 20:17:33 +05:30
Pramod Mahajan
7dfed25d8e created new DTO for projectsallocation for one specific employee 2025-06-09 20:15:15 +05:30
Pramod Mahajan
9ed615110d created two end pointe for assigne and unassign project for perticular employee 2025-06-09 20:15:15 +05:30
Pramod Mahajan
4f0515f8f4 created new dto for projectAllocation for employee 2025-06-09 20:15:15 +05:30
361a2ab5c3 Sending Is Active in Object Of Contact notes 2025-06-09 20:14:26 +05:30
0db199e74f fixed the bug of only sending ID of logged in employee in Bucket object 2025-06-09 20:14:26 +05:30
a6fc75f492 Stopping multiple entries in employee-bucket mapping table 2025-06-09 20:14:26 +05:30
af9e06cd98 Sending last updatedBy and updatedAt when sending list of notes 2025-06-09 20:14:26 +05:30
7dc80ec006 Included object consist of basic infromation of employee who created the bucket in View models 2025-06-09 20:14:26 +05:30
4abeb8cf5a Sending number of conacts within the bucket with it information in API Update bucket, Assign Bucket, and Get Bucket List 2025-06-09 20:14:26 +05:30
b88dbea6c6 Corrected Spelling mistakes 2025-06-09 20:14:25 +05:30
138eb963d0 Implemented an API to delete a Bucket 2025-06-09 20:14:25 +05:30
ae08ebeae5 Implement API to Assign Bucket to Employees 2025-06-09 20:14:20 +05:30
49988c9814 Enhancement #381: Update "Update Bucket" API to Enforce Feature 2025-06-09 20:14:00 +05:30
915ad7bdb5 Enhancement #380: Update "Create Bucket" API to Enforce Feature 2025-06-09 20:14:00 +05:30
aad79953f5 Enhancement #378: Update "Get Bucket List" API to Enforce Feature 2025-06-09 20:14:00 +05:30
404c16946b Enhancement #377: Update "Update Contact" API to Enforce Feature 2025-06-09 20:14:00 +05:30
ac837ef241 Enhancement #376: Update "Get Contact by Bucket ID" API to Enforce Feature Permissions 2025-06-09 20:13:59 +05:30
3f74646437 Enhancement #375: Update "Get Contact" API to Enforce Feature Permissions 2025-06-09 20:13:54 +05:30
6e2b0eaec0 Added an API to suspend a n existing Contact-note 2025-06-09 20:07:19 +05:30
1e0e277bbf Added an API to Update existing Contact-note 2025-06-09 20:07:19 +05:30
9a19440622 Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-06-09 20:01:30 +05:30
85adf50418 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 19:57:20 +05:30
8ca07410b0 Added an API to suspend a n existing Contact-note 2025-06-09 19:37:04 +05:30
84767d41b8 Added an API to Update existing Contact-note 2025-06-09 19:37:04 +05:30
ec63cde59b Added functionality to stop recreating tas of same name 2025-06-09 19:35:30 +05:30
166d556b6c added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 19:33:11 +05:30
17398dafa6 Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-06-09 19:31:31 +05:30
45cdbd91c9 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 19:30:13 +05:30
Pramod Mahajan
ddc6f9e393 added api to get list of contact tag 2025-06-09 19:26:03 +05:30
d294bcef44 Created an endpoint to fetch list of all contact category in that tenant 2025-06-09 19:24:31 +05:30
9ceba92447 Add Directory Management Feature with Permission Handling 2025-06-09 19:08:21 +05:30
69d27c7471 Implemented an API to update Contact Category Master 2025-06-09 19:08:21 +05:30
30cd9d3a57 Implemented an API to update Buckets for grouping contacts. 2025-06-09 19:08:21 +05:30
0427b41961 Accepting List of buckets and categories Ids rather than as payload 2025-06-09 19:08:21 +05:30
e407c96bda Implemented filtering functionality for Get Contact List API 2025-06-09 19:08:17 +05:30
8f1c1489e5 Update Marco.Pms.Services/Helpers/DirectoryHelper.cs
Added entrie to DirectoryUpdateLog Table
2025-06-09 19:07:47 +05:30
5464ee6200 Implemented an API to suspend a Contact 2025-06-09 19:07:47 +05:30
Pramod Mahajan
66c167f027 created api for contact Tag Update 2025-06-09 19:07:44 +05:30
aaacd6be91 Implemented an API to retrieve a list of organizations provided in the contacts. 2025-06-09 19:07:22 +05:30
f93caa7994 Created an API to get contact profile by its Id 2025-06-09 19:07:19 +05:30
7fd3c7b0b3 Changed tag validation 2025-06-09 19:07:01 +05:30
928886ac72 Corrected the typo of ContactTagtId to ContactTagId 2025-06-09 19:06:57 +05:30
eb096685d5 Added an API to suspend a n existing Contact-note 2025-06-09 19:05:05 +05:30
d62725cb38 Added an API to Update existing Contact-note 2025-06-09 19:05:05 +05:30
64aaf325bd Added an API to get contact category by its size 2025-06-09 19:05:05 +05:30
60acd104c1 Added functionality to stop recreating tas of same name 2025-06-09 19:05:05 +05:30
b3ceecaf9e properly mapped the updated Dto to contact table 2025-06-09 19:05:05 +05:30
1e70f2bffc added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 19:05:05 +05:30
eb897af87f Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-06-09 19:05:04 +05:30
93997c16a2 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 19:05:04 +05:30
88233d9435 When checking in exsiting tag change Id from mapping Id to Tag ID 2025-06-09 19:05:04 +05:30
3b09a5f625 Added an API to create bucket 2025-06-09 19:05:04 +05:30
de8ef72cae Added an API to create a contact tag 2025-06-09 19:05:04 +05:30
9921683fa6 Added an API to Get a list of buckets Assigned to that employee 2025-06-09 19:05:04 +05:30
Pramod Mahajan
a5c472b52e added api to get list of contact tag 2025-06-09 19:05:04 +05:30
54c66daa18 Added an API to update existing contact 2025-06-09 19:05:04 +05:30
7c1171fbb0 Added logs to the 'Get List of Contacts' endpoint. 2025-06-09 19:04:25 +05:30
a0bf548e64 Added an API to create contact and populate related tables as well 2025-06-09 19:04:25 +05:30
Pramod Mahajan
94305f34ed created GetListOfContact custome function 2025-06-09 19:04:24 +05:30
25c91a64ad Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-06-09 19:04:24 +05:30
a7f41af44f Added an API to add a note to specific contact 2025-06-09 19:04:24 +05:30
c9073652c8 Added an API to suspend a n existing Contact-note 2025-06-09 19:04:24 +05:30
2650bdb17a Added an API to Update existing Contact-note 2025-06-09 19:04:24 +05:30
f7543a37a1 added an API to get a list of contact-notes by contact ID 2025-06-09 19:03:55 +05:30
42b5478b52 Added functionality to stop recreating tas of same name 2025-06-09 19:03:12 +05:30
eac2c31ea4 properly mapped the updated Dto to contact table 2025-06-09 19:03:11 +05:30
a00ef4313a Refetched the contact in update contact API 2025-06-09 19:03:11 +05:30
20b1f45915 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 19:03:07 +05:30
3c14df4d53 Added an API to delete existing contact category 2025-06-09 19:01:53 +05:30
5f2626db88 Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-06-09 19:01:53 +05:30
9da45240c3 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 19:01:50 +05:30
81d3e016c2 When checking in exsiting tag change Id from mapping Id to Tag ID 2025-06-09 19:01:32 +05:30
bea8793fba Added an API to create bucket 2025-06-09 19:01:32 +05:30
9c25aa1aab Added an API to create a contact tag 2025-06-09 19:01:27 +05:30
9e813c1e51 Added an API to Get a list of buckets Assigned to that employee 2025-06-09 19:00:59 +05:30
Pramod Mahajan
6e0cdbcfe3 added api to get list of contact tag 2025-06-09 19:00:34 +05:30
76671bc5dc Added an API to update existing contact 2025-06-09 19:00:07 +05:30
4f250ab46e Created an endpoint to fetch list of all contact category in that tenant 2025-06-09 19:00:07 +05:30
bab5243108 Created an API to create the Contact category 2025-06-09 19:00:02 +05:30
47d7cbba4f Added logs to the 'Get List of Contacts' endpoint. 2025-06-09 18:59:32 +05:30
3d9e22c308 Added an API to create contact and populate related tables as well 2025-06-09 18:59:32 +05:30
f2699898ed Added an API to create contact and populate related tables as well 2025-06-09 18:59:32 +05:30
Pramod Mahajan
9d67a25488 created GetListOfContact custome function 2025-06-09 18:59:27 +05:30
58b0a3fbaa Added DirectoryHelper in helper folder 2025-06-09 18:58:45 +05:30
b5ce7eb73f Added Migration for contact related tables 2025-06-09 18:57:17 +05:30
a23c8c3ff0 An API skeleton has been added. 2025-06-09 18:53:03 +05:30
52e9cb7de9 Added Directory controller file 2025-06-09 18:53:00 +05:30
8da02932e4 Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-06-09 18:52:22 +05:30
ccef0ba192 Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-06-09 18:50:19 +05:30
621b96a805 fixed the bug of only sending ID of logged in employee in Bucket object 2025-06-09 18:47:24 +05:30
f0bf5dca83 Stopping multiple entries in employee-bucket mapping table 2025-06-09 18:47:24 +05:30
d60608e544 Sending last updatedBy and updatedAt when sending list of notes 2025-06-09 18:47:24 +05:30
a48d4d308f Included object consist of basic infromation of employee who created the bucket in View models 2025-06-09 18:47:24 +05:30
197b4aea8d Sending number of conacts within the bucket with it information in API Update bucket, Assign Bucket, and Get Bucket List 2025-06-09 18:47:24 +05:30
453a64fea0 Corrected Spelling mistakes 2025-06-09 18:47:24 +05:30
a755e77397 Implemented an API to delete a Bucket 2025-06-09 18:47:24 +05:30
049189024a Implement API to Assign Bucket to Employees 2025-06-09 18:47:24 +05:30
c1cc8d5d34 Enhancement #381: Update "Update Bucket" API to Enforce Feature 2025-06-09 18:47:24 +05:30
f7d90b85e8 Enhancement #380: Update "Create Bucket" API to Enforce Feature 2025-06-09 18:47:24 +05:30
f621dbf27c Enhancement #378: Update "Get Bucket List" API to Enforce Feature 2025-06-09 18:47:24 +05:30
4650e0cbbb Enhancement #377: Update "Update Contact" API to Enforce Feature 2025-06-09 18:47:24 +05:30
fb2648ba17 Enhancement #376: Update "Get Contact by Bucket ID" API to Enforce Feature Permissions 2025-06-09 18:47:24 +05:30
54ea82b984 Enhancement #375: Update "Get Contact" API to Enforce Feature Permissions 2025-06-09 18:47:24 +05:30
3128372a78 Add Directory Management Feature with Permission Handling 2025-06-09 18:47:23 +05:30
bad2386fa4 Created an API to get contact profile by its Id 2025-06-09 18:47:23 +05:30
6a1fa9a4f8 Added an API to suspend a n existing Contact-note 2025-06-09 18:47:23 +05:30
605fd9c78d Added an API to Update existing Contact-note 2025-06-09 18:47:23 +05:30
5fde9c5e53 Added functionality to stop recreating tas of same name 2025-06-09 18:47:23 +05:30
7d704b138b properly mapped the updated Dto to contact table 2025-06-09 18:47:23 +05:30
3841dca11e added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 18:47:23 +05:30
5e184c770d Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-06-09 18:47:23 +05:30
0795eda5cc added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 18:47:23 +05:30
e175e58450 Added an API to Get a list of buckets Assigned to that employee 2025-06-09 18:47:23 +05:30
80da3199b9 Created an endpoint to fetch list of all contact category in that tenant 2025-06-09 18:47:23 +05:30
Pramod Mahajan
eea2b7a8b3 created GetListOfContact custome function 2025-06-09 18:47:23 +05:30
7dca88153f Added an API to suspend a n existing Contact-note 2025-06-09 18:47:23 +05:30
220b87d5c3 Added an API to Update existing Contact-note 2025-06-09 18:47:23 +05:30
ed9a2467e9 added an API to get a list of contact-notes by contact ID 2025-06-09 18:47:23 +05:30
ff13507f8f Added functionality to stop recreating tas of same name 2025-06-09 18:47:23 +05:30
0fb3690133 properly mapped the updated Dto to contact table 2025-06-09 18:47:23 +05:30
7a2ce067ab added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 18:47:22 +05:30
115e38b58f Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-06-09 18:47:22 +05:30
578b2e0d67 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 18:47:22 +05:30
Pramod Mahajan
eb3bd425f6 added api to get list of contact tag 2025-06-09 18:47:22 +05:30
81f91c3b6d Created an endpoint to fetch list of all contact category in that tenant 2025-06-09 18:47:22 +05:30
9e124d0ae5 Added an API to create contact and populate related tables as well 2025-06-09 18:47:22 +05:30
d3a800fbf9 Added Migration for contact related tables 2025-06-09 18:47:22 +05:30
c51da8d1b4 Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-06-09 18:47:22 +05:30
10322fa432 Add Directory Management Feature with Permission Handling 2025-06-09 18:47:22 +05:30
2a0adc75c4 Implemented an API to update Contact Category Master 2025-06-09 18:47:21 +05:30
38463ccf07 Implemented an API to update Buckets for grouping contacts. 2025-06-09 18:47:21 +05:30
6dbd968676 Accepting List of buckets and categories Ids rather than as payload 2025-06-09 18:47:21 +05:30
707b948e15 Implemented filtering functionality for Get Contact List API 2025-06-09 18:47:21 +05:30
2456a9a039 Update Marco.Pms.Services/Helpers/DirectoryHelper.cs
Added entrie to DirectoryUpdateLog Table
2025-06-09 18:47:21 +05:30
d1995b820c Implemented an API to suspend a Contact 2025-06-09 18:47:21 +05:30
Pramod Mahajan
8c915d7a1d created api for contact Tag Update 2025-06-09 18:47:21 +05:30
b15022774f Implemented an API to retrieve a list of organizations provided in the contacts. 2025-06-09 18:47:21 +05:30
3633d2ce4b changed all list in contact profile view model to non-nullable and set default value to empty list 2025-06-09 18:47:21 +05:30
9922255514 Created an API to get contact profile by its Id 2025-06-09 18:47:21 +05:30
ad659c4fc9 Changed tag validation 2025-06-09 18:47:21 +05:30
d136e8b95e Addd migrations fro Typo 2025-06-09 18:47:21 +05:30
9fd01c7903 Corrected the typo of ContactTagtId to ContactTagId 2025-06-09 18:47:20 +05:30
872bcdd236 Added an API to suspend a n existing Contact-note 2025-06-09 18:47:20 +05:30
8209f06410 Added an API to Update existing Contact-note 2025-06-09 18:47:20 +05:30
a4aae7ebbe Added an API to get contact category by its size 2025-06-09 18:47:20 +05:30
9a5be28196 Added functionality to stop recreating tas of same name 2025-06-09 18:47:20 +05:30
1d6f8825c6 properly mapped the updated Dto to contact table 2025-06-09 18:47:20 +05:30
6f902178a4 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 18:47:20 +05:30
282a21adc2 Added an API to delete existing contact category 2025-06-09 18:47:20 +05:30
f994ee14a2 Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-06-09 18:47:20 +05:30
4eeeec5dbe added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 18:47:20 +05:30
56e444f87f When checking in exsiting tag change Id from mapping Id to Tag ID 2025-06-09 18:47:20 +05:30
7016e38bc4 Added an API to create bucket 2025-06-09 18:47:20 +05:30
0917b6665f Added an API to create a contact tag 2025-06-09 18:47:20 +05:30
1f49057cb6 Added an API to Get a list of buckets Assigned to that employee 2025-06-09 18:47:20 +05:30
Pramod Mahajan
5a9c08fd6c added api to get list of contact tag 2025-06-09 18:47:20 +05:30
cc0ac31746 Added an API to update existing contact 2025-06-09 18:47:19 +05:30
5d71f3f2db Created an endpoint to fetch list of all contact category in that tenant 2025-06-09 18:47:19 +05:30
2985cba79b Added logs to the 'Get List of Contacts' endpoint. 2025-06-09 18:47:19 +05:30
81992f6abd Added an API to create contact and populate related tables as well 2025-06-09 18:47:19 +05:30
Pramod Mahajan
1f2cc2b2e6 created GetListOfContact custome function 2025-06-09 18:47:19 +05:30
542701f342 Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-06-09 18:47:19 +05:30
33e765558c Added an API to add a note to specific contact 2025-06-09 18:47:19 +05:30
ec1325dc03 Added an API to suspend a n existing Contact-note 2025-06-09 18:47:19 +05:30
fa3a7ab7f2 Added an API to Update existing Contact-note 2025-06-09 18:47:19 +05:30
10625101e1 Added an API to get contact category by its size 2025-06-09 18:47:19 +05:30
dc36cb57f4 added an API to get a list of contact-notes by contact ID 2025-06-09 18:47:19 +05:30
f820bedba3 Added an API to deleted ContactTag as well remove entries in contact-tag mapping table related to that tag 2025-06-09 18:47:19 +05:30
15c665236b Added functionality to stop recreating tas of same name 2025-06-09 18:47:19 +05:30
20eaccef04 properly mapped the updated Dto to contact table 2025-06-09 18:47:19 +05:30
3376812538 Refetched the contact in update contact API 2025-06-09 18:47:19 +05:30
e427781ad9 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 18:47:19 +05:30
fe0d5e8458 Added an API to delete existing contact category 2025-06-09 18:47:19 +05:30
e89036359d Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-06-09 18:47:19 +05:30
999f9168c2 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-06-09 18:47:19 +05:30
0a59f87b84 When checking in exsiting tag change Id from mapping Id to Tag ID 2025-06-09 18:47:18 +05:30
49bbd87a3d Added an API to create bucket 2025-06-09 18:47:18 +05:30
d52956abd9 Fixed the errorof finding tag in wrong table 2025-06-09 18:47:18 +05:30
e049b6c996 Added an API to create a contact tag 2025-06-09 18:47:18 +05:30
532e0ff16d Added an API to Get a list of buckets Assigned to that employee 2025-06-09 18:47:18 +05:30
Pramod Mahajan
967488e9c1 added api to get list of contact tag 2025-06-09 18:47:18 +05:30
ecc8c6d801 Added an API to update existing contact 2025-06-09 18:47:18 +05:30
3043a3f7ed Created an endpoint to fetch list of all contact category in that tenant 2025-06-09 18:47:18 +05:30
bb0c2acc87 Created an API to create the Contact category 2025-06-09 18:47:18 +05:30
7dffdc4c25 Added logs to the 'Get List of Contacts' endpoint. 2025-06-09 18:47:18 +05:30
d5e150d768 Added an API to create contact and populate related tables as well 2025-06-09 18:47:18 +05:30
f26d5d0021 Added an API to create contact and populate related tables as well 2025-06-09 18:47:18 +05:30
Pramod Mahajan
278a55ebe3 created GetListOfContact custome function 2025-06-09 18:47:18 +05:30
38babea9d5 Added DirectoryHelper in helper folder 2025-06-09 18:47:18 +05:30
73df47e540 Added Migration for contact related tables 2025-06-09 18:47:18 +05:30
5932a21fcc An API skeleton has been added. 2025-06-09 18:47:18 +05:30
58c73383b2 Added Directory controller file 2025-06-09 18:47:18 +05:30
004bb94d99 Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-06-09 18:47:18 +05:30
2c20d49609 revert c7e89630eb494454c1322bdf4cf29ab076af7b86
revert Models, DTOs (Data Transfer Objects), and view models have been created for the directory.
2025-06-09 18:47:17 +05:30
2002a79360 Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-06-09 18:47:17 +05:30
Pramod Mahajan
b74f701448 created new DTO for projectsallocation for one specific employee 2025-06-09 12:16:02 +05:30
Pramod Mahajan
ff0c694ed3 Merge branch 'pramod_Task#455' of https://git.marcoaiot.com/admin/marco.pms.api into Feature_Directory 2025-06-09 11:57:51 +05:30
Pramod Mahajan
280fc922ff created two end pointe for assigne and unassign project for perticular employee 2025-06-09 09:48:35 +05:30
Pramod Mahajan
681cdd690c created new dto for projectAllocation for employee 2025-06-09 09:46:30 +05:30
3a37cfdf37 Resloved conflicts 2025-05-31 19:01:13 +05:30
4282966afd resloved rebase conflicts 2025-05-31 18:58:20 +05:30
03b62cd27b fixed the bug of only sending ID of logged in employee in Bucket object 2025-05-31 18:55:18 +05:30
ff2b33a66d Stopping multiple entries in employee-bucket mapping table 2025-05-31 18:55:18 +05:30
85b327d0c4 Sending last updatedBy and updatedAt when sending list of notes 2025-05-31 18:55:18 +05:30
da797b2208 Included object consist of basic infromation of employee who created the bucket in View models 2025-05-31 18:55:18 +05:30
8ef654ad2e Sending number of conacts within the bucket with it information in API Update bucket, Assign Bucket, and Get Bucket List 2025-05-31 18:55:18 +05:30
738d1e6a0a Corrected Spelling mistakes 2025-05-31 18:55:18 +05:30
56645ff40f Implemented an API to delete a Bucket 2025-05-31 18:55:18 +05:30
193add07e1 Implement API to Assign Bucket to Employees 2025-05-31 18:55:18 +05:30
bd969616ad Enhancement #381: Update "Update Bucket" API to Enforce Feature 2025-05-31 18:55:18 +05:30
c2ddd6097c Enhancement #380: Update "Create Bucket" API to Enforce Feature 2025-05-31 18:55:18 +05:30
b5707ba133 Enhancement #378: Update "Get Bucket List" API to Enforce Feature 2025-05-31 18:55:18 +05:30
a0cc285d6f Enhancement #377: Update "Update Contact" API to Enforce Feature 2025-05-31 18:55:18 +05:30
10df95c481 Enhancement #376: Update "Get Contact by Bucket ID" API to Enforce Feature Permissions 2025-05-31 18:55:18 +05:30
5908b54312 Enhancement #375: Update "Get Contact" API to Enforce Feature Permissions 2025-05-31 18:55:18 +05:30
6b80c3bfeb Add Directory Management Feature with Permission Handling 2025-05-31 18:55:14 +05:30
8820483584 Created an API to get contact profile by its Id 2025-05-31 18:49:45 +05:30
93e1b13f54 Added an API to suspend a n existing Contact-note 2025-05-31 18:44:09 +05:30
dff77aa22f Added an API to Update existing Contact-note 2025-05-31 18:44:09 +05:30
75cb4557e4 Added functionality to stop recreating tas of same name 2025-05-31 18:42:26 +05:30
e9157d7985 properly mapped the updated Dto to contact table 2025-05-31 18:40:33 +05:30
86ebc95ada added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-31 18:39:54 +05:30
b0aefdc93a Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-05-31 18:37:43 +05:30
f6685a1ca5 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-31 18:35:39 +05:30
fd14670914 Added an API to Get a list of buckets Assigned to that employee 2025-05-31 18:32:44 +05:30
b161ed7c15 Created an endpoint to fetch list of all contact category in that tenant 2025-05-31 18:31:10 +05:30
Pramod Mahajan
e4a611ccc2 created GetListOfContact custome function 2025-05-31 18:27:27 +05:30
cc06c2dfc4 Added an API to suspend a n existing Contact-note 2025-05-31 18:00:09 +05:30
29fa0e87d1 Added an API to Update existing Contact-note 2025-05-31 18:00:09 +05:30
852124d971 added an API to get a list of contact-notes by contact ID 2025-05-31 17:58:51 +05:30
45897b99cb Added functionality to stop recreating tas of same name 2025-05-31 17:53:35 +05:30
7ae001e277 properly mapped the updated Dto to contact table 2025-05-31 17:50:04 +05:30
b7a9d6148d added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-31 17:49:27 +05:30
244a6cc547 Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-05-31 17:46:15 +05:30
4cebaba540 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-31 17:44:59 +05:30
Pramod Mahajan
040e9c311b added api to get list of contact tag 2025-05-31 17:37:45 +05:30
62734fc583 Created an endpoint to fetch list of all contact category in that tenant 2025-05-31 17:28:05 +05:30
20efab871a Added an API to create contact and populate related tables as well 2025-05-31 17:23:01 +05:30
39224c7ed7 Added Migration for contact related tables 2025-05-31 17:12:15 +05:30
2119171291 Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-31 17:02:10 +05:30
2339384b5e Add Directory Management Feature with Permission Handling 2025-05-31 16:57:54 +05:30
02a7791041 Implemented an API to update Contact Category Master 2025-05-31 16:57:54 +05:30
c00d1a5451 Implemented an API to update Buckets for grouping contacts. 2025-05-31 16:57:54 +05:30
e917ff3e9c Accepting List of buckets and categories Ids rather than as payload 2025-05-31 16:57:53 +05:30
cd091eda56 Implemented filtering functionality for Get Contact List API 2025-05-31 16:57:53 +05:30
aa6df0f803 Update Marco.Pms.Services/Helpers/DirectoryHelper.cs
Added entrie to DirectoryUpdateLog Table
2025-05-31 16:57:53 +05:30
2e64f4de32 Implemented an API to suspend a Contact 2025-05-31 16:57:53 +05:30
Pramod Mahajan
8c9ce52ec2 created api for contact Tag Update 2025-05-31 16:57:53 +05:30
635654890e Implemented an API to retrieve a list of organizations provided in the contacts. 2025-05-31 16:57:53 +05:30
fbfd04c898 changed all list in contact profile view model to non-nullable and set default value to empty list 2025-05-31 16:57:53 +05:30
92e6942437 Created an API to get contact profile by its Id 2025-05-31 16:57:53 +05:30
04216791f7 Changed tag validation 2025-05-31 16:57:53 +05:30
0b308c776b Addd migrations fro Typo 2025-05-31 16:57:53 +05:30
6704e168c3 Corrected the typo of ContactTagtId to ContactTagId 2025-05-31 16:57:52 +05:30
70c9d4bb3d Added an API to suspend a n existing Contact-note 2025-05-31 16:57:52 +05:30
3b1b6e9d89 Added an API to Update existing Contact-note 2025-05-31 16:57:52 +05:30
a31b4b73ab Added an API to get contact category by its size 2025-05-31 16:57:52 +05:30
0973e722fb Added functionality to stop recreating tas of same name 2025-05-31 16:57:52 +05:30
f1e3febfb0 properly mapped the updated Dto to contact table 2025-05-31 16:57:52 +05:30
3ab215b401 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-31 16:57:52 +05:30
e6f8cc626b Added an API to delete existing contact category 2025-05-31 16:57:52 +05:30
cedf3d19b5 Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-05-31 16:57:52 +05:30
b4cffbf713 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-31 16:57:51 +05:30
f18b1f8dea When checking in exsiting tag change Id from mapping Id to Tag ID 2025-05-31 16:57:51 +05:30
c78c9a92b4 Added an API to create bucket 2025-05-31 16:57:51 +05:30
3f0d6f26fc Added an API to create a contact tag 2025-05-31 16:57:51 +05:30
ec72632004 Added an API to Get a list of buckets Assigned to that employee 2025-05-31 16:57:51 +05:30
Pramod Mahajan
4060d7d1f2 added api to get list of contact tag 2025-05-31 16:57:51 +05:30
12a1e1cf27 Added an API to update existing contact 2025-05-31 16:57:51 +05:30
ca561711de Created an endpoint to fetch list of all contact category in that tenant 2025-05-31 16:57:51 +05:30
acffebfb90 Added logs to the 'Get List of Contacts' endpoint. 2025-05-31 16:57:51 +05:30
f785003e9b Added an API to create contact and populate related tables as well 2025-05-31 16:57:51 +05:30
Pramod Mahajan
f7dce83629 created GetListOfContact custome function 2025-05-31 16:57:51 +05:30
df1408b63a Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-31 16:57:51 +05:30
77306c6bdb Added an API to add a note to specific contact 2025-05-31 16:57:51 +05:30
7660063ac3 Added an API to suspend a n existing Contact-note 2025-05-31 16:57:51 +05:30
ebc4a1e071 Added an API to Update existing Contact-note 2025-05-31 16:57:51 +05:30
f1c6468e47 Added an API to get contact category by its size 2025-05-31 16:57:50 +05:30
ae20e215db added an API to get a list of contact-notes by contact ID 2025-05-31 16:57:50 +05:30
b9b06ba54c Added an API to deleted ContactTag as well remove entries in contact-tag mapping table related to that tag 2025-05-31 16:57:50 +05:30
ba38c857a2 Added functionality to stop recreating tas of same name 2025-05-31 16:57:50 +05:30
f42ebe3886 properly mapped the updated Dto to contact table 2025-05-31 16:57:50 +05:30
85d7863fb2 Refetched the contact in update contact API 2025-05-31 16:57:50 +05:30
9709893603 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-31 16:57:50 +05:30
922eb7bc0d Added an API to delete existing contact category 2025-05-31 16:57:50 +05:30
de324407d0 Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-05-31 16:57:50 +05:30
9247221a9f added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-31 16:57:50 +05:30
4b4ebee1a1 When checking in exsiting tag change Id from mapping Id to Tag ID 2025-05-31 16:57:50 +05:30
49ddd3ec45 Added an API to create bucket 2025-05-31 16:57:50 +05:30
8ab737fe8a Fixed the errorof finding tag in wrong table 2025-05-31 16:57:50 +05:30
7f5f3da5fb Added an API to create a contact tag 2025-05-31 16:57:49 +05:30
684598eb6b Added an API to Get a list of buckets Assigned to that employee 2025-05-31 16:57:49 +05:30
Pramod Mahajan
adc31a6909 added api to get list of contact tag 2025-05-31 16:57:49 +05:30
b3d4018c5f Added an API to update existing contact 2025-05-31 16:57:49 +05:30
84b1e7de0b Created an endpoint to fetch list of all contact category in that tenant 2025-05-31 16:57:49 +05:30
783c6576de Created an API to create the Contact category 2025-05-31 16:57:49 +05:30
66b8a74873 Added logs to the 'Get List of Contacts' endpoint. 2025-05-31 16:57:49 +05:30
c2bdf76957 Added an API to create contact and populate related tables as well 2025-05-31 16:57:49 +05:30
a8b935946a Added an API to create contact and populate related tables as well 2025-05-31 16:57:49 +05:30
Pramod Mahajan
40c0bcd3ca created GetListOfContact custome function 2025-05-31 16:57:49 +05:30
bba751256e Added DirectoryHelper in helper folder 2025-05-31 16:57:49 +05:30
bb8c314723 Added Migration for contact related tables 2025-05-31 16:57:44 +05:30
07bec97973 An API skeleton has been added. 2025-05-31 16:56:36 +05:30
ba486cffd8 Added Directory controller file 2025-05-31 16:56:36 +05:30
260ea2214d Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-31 16:56:36 +05:30
c85c6f4df5 revert c7e89630eb494454c1322bdf4cf29ab076af7b86
revert Models, DTOs (Data Transfer Objects), and view models have been created for the directory.
2025-05-31 16:56:36 +05:30
2cb283f1cd Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-31 16:56:36 +05:30
5ad2a795b8 Sending Is Active in Object Of Contact notes 2025-05-29 11:49:08 +05:30
a64e9538e4 fixed the bug of only sending ID of logged in employee in Bucket object 2025-05-28 15:55:00 +05:30
591b54c901 Stopping multiple entries in employee-bucket mapping table 2025-05-28 15:14:31 +05:30
55e8ace430 Sending last updatedBy and updatedAt when sending list of notes 2025-05-28 15:00:56 +05:30
2552e4b83d Included object consist of basic infromation of employee who created the bucket in View models 2025-05-28 12:48:02 +05:30
ad34ca12e6 Sending number of conacts within the bucket with it information in API Update bucket, Assign Bucket, and Get Bucket List 2025-05-28 11:36:40 +05:30
b42b8b726a Merge pull request 'Ashutosh_Task#269_Delete_Bucket' (#77) from Ashutosh_Task#269_Delete_Bucket into Feature_Directory
Reviewed-on: #77
2025-05-28 05:45:47 +00:00
72fc8bd0d6 Corrected Spelling mistakes 2025-05-28 10:45:03 +05:30
ae51422079 Implemented an API to delete a Bucket 2025-05-28 10:40:00 +05:30
6036415ef4 Merge pull request 'Implement API to Assign Bucket to Employees' (#76) from Ashutosh_Task#387_Assign_Bucket into Feature_Directory
Reviewed-on: #76
2025-05-27 11:09:51 +00:00
c4050232f2 Implement API to Assign Bucket to Employees 2025-05-27 16:29:42 +05:30
7a0d85400f Merge pull request 'Ashutosh_#375_To_#381' (#75) from Ashutosh_#375_To_#381 into Feature_Directory
Reviewed-on: #75
2025-05-27 07:49:17 +00:00
fb3932fe25 Enhancement #381: Update "Update Bucket" API to Enforce Feature 2025-05-27 12:37:24 +05:30
1490cfc195 Enhancement #380: Update "Create Bucket" API to Enforce Feature 2025-05-27 12:35:09 +05:30
1e6b2d7527 Enhancement #378: Update "Get Bucket List" API to Enforce Feature 2025-05-27 12:32:51 +05:30
db25c25b9b Enhancement #377: Update "Update Contact" API to Enforce Feature 2025-05-27 12:28:22 +05:30
9f53fb2df7 Enhancement #376: Update "Get Contact by Bucket ID" API to Enforce Feature Permissions 2025-05-27 12:27:04 +05:30
b638e35b25 Enhancement #375: Update "Get Contact" API to Enforce Feature Permissions 2025-05-27 12:24:41 +05:30
27a7044ede fixed rebase 2025-05-26 13:32:29 +05:30
c4a1c52acd Add Directory Management Feature with Permission Handling 2025-05-26 13:29:56 +05:30
80a22741b2 Implemented an API to update Contact Category Master 2025-05-26 13:29:32 +05:30
2ce81b8b9a Implemented an API to update Buckets for grouping contacts. 2025-05-26 13:29:32 +05:30
13d8935b72 Accepting List of buckets and categories Ids rather than as payload 2025-05-26 13:29:32 +05:30
62f9b2256e Implemented filtering functionality for Get Contact List API 2025-05-26 13:29:29 +05:30
a9d20b8077 Update Marco.Pms.Services/Helpers/DirectoryHelper.cs
Added entrie to DirectoryUpdateLog Table
2025-05-26 13:28:40 +05:30
616cebbf94 Implemented an API to suspend a Contact 2025-05-26 13:28:40 +05:30
Pramod Mahajan
8f267f9ef9 created api for contact Tag Update 2025-05-26 13:28:40 +05:30
afbfea3fc0 Implemented an API to retrieve a list of organizations provided in the contacts. 2025-05-26 13:28:40 +05:30
ac7197c197 changed all list in contact profile view model to non-nullable and set default value to empty list 2025-05-26 13:28:40 +05:30
811e0ac807 Created an API to get contact profile by its Id 2025-05-26 13:28:40 +05:30
efc5e22f7b Changed tag validation 2025-05-26 13:28:40 +05:30
d4b2d6025d Addd migrations fro Typo 2025-05-26 13:28:40 +05:30
999b2f06e0 Corrected the typo of ContactTagtId to ContactTagId 2025-05-26 13:28:40 +05:30
13b93d5bd5 Added an API to suspend a n existing Contact-note 2025-05-26 13:28:25 +05:30
77a1cfd9dc Added an API to Update existing Contact-note 2025-05-26 13:28:25 +05:30
5f90ddf454 Added an API to get contact category by its size 2025-05-26 13:28:21 +05:30
d014fcd1e4 Added functionality to stop recreating tas of same name 2025-05-26 13:17:11 +05:30
50f698bf89 properly mapped the updated Dto to contact table 2025-05-26 13:17:11 +05:30
65a0e60c8a added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-26 13:16:47 +05:30
a97b95eb00 Added an API to delete existing contact category 2025-05-26 13:08:37 +05:30
57d430be1e Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-05-26 13:08:33 +05:30
f50cb8e2dd added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-26 13:07:10 +05:30
2d939e5372 When checking in exsiting tag change Id from mapping Id to Tag ID 2025-05-26 13:02:47 +05:30
c785b270f0 Added an API to create bucket 2025-05-26 13:02:47 +05:30
b41640a120 Added an API to create a contact tag 2025-05-26 13:02:41 +05:30
5a487076ab Added an API to Get a list of buckets Assigned to that employee 2025-05-26 13:02:06 +05:30
Pramod Mahajan
9fa3351795 added api to get list of contact tag 2025-05-26 13:01:13 +05:30
2d126bf5b9 Added an API to update existing contact 2025-05-26 13:00:23 +05:30
53c210915a Created an endpoint to fetch list of all contact category in that tenant 2025-05-26 12:59:44 +05:30
aa60551524 Added logs to the 'Get List of Contacts' endpoint. 2025-05-26 12:58:27 +05:30
34f32bdd33 Added an API to create contact and populate related tables as well 2025-05-26 12:56:06 +05:30
Pramod Mahajan
e3e19a938a created GetListOfContact custome function 2025-05-26 12:55:27 +05:30
c25a7c4b9c Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-26 12:37:10 +05:30
a752bc39fe Added an API to add a note to specific contact 2025-05-26 12:30:56 +05:30
70ec3b6a44 Added an API to suspend a n existing Contact-note 2025-05-26 12:30:56 +05:30
b381397e40 Added an API to Update existing Contact-note 2025-05-26 12:30:56 +05:30
4492c60159 Added an API to get contact category by its size 2025-05-26 12:30:56 +05:30
24968be0ff added an API to get a list of contact-notes by contact ID 2025-05-26 12:30:56 +05:30
9af085c2fd Added an API to deleted ContactTag as well remove entries in contact-tag mapping table related to that tag 2025-05-26 12:30:56 +05:30
e76c203614 Added functionality to stop recreating tas of same name 2025-05-26 12:30:56 +05:30
871493bf61 properly mapped the updated Dto to contact table 2025-05-26 12:30:56 +05:30
9d8ab76388 Refetched the contact in update contact API 2025-05-26 12:30:56 +05:30
f560a0207d added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-26 12:30:56 +05:30
10a68125ba Added an API to delete existing contact category 2025-05-26 12:30:56 +05:30
a005db4150 Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-05-26 12:30:56 +05:30
7a91db7ac1 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-26 12:30:56 +05:30
4a33e54ebc When checking in exsiting tag change Id from mapping Id to Tag ID 2025-05-26 12:30:56 +05:30
5c5bf6b9e6 Added an API to create bucket 2025-05-26 12:30:56 +05:30
a0b36b204e Fixed the errorof finding tag in wrong table 2025-05-26 12:30:55 +05:30
23db7c4861 Added an API to create a contact tag 2025-05-26 12:30:55 +05:30
4d1126b3f8 Added an API to Get a list of buckets Assigned to that employee 2025-05-26 12:30:55 +05:30
Pramod Mahajan
1a64879a05 added api to get list of contact tag 2025-05-26 12:30:55 +05:30
0809d26517 Added an API to update existing contact 2025-05-26 12:30:55 +05:30
b4505827bb Created an endpoint to fetch list of all contact category in that tenant 2025-05-26 12:30:55 +05:30
cf9f6ce5a3 Created an API to create the Contact category 2025-05-26 12:30:55 +05:30
94434e8068 Added logs to the 'Get List of Contacts' endpoint. 2025-05-26 12:30:55 +05:30
3e4f29b186 Added an API to create contact and populate related tables as well 2025-05-26 12:30:55 +05:30
c95a666c31 Added an API to create contact and populate related tables as well 2025-05-26 12:30:46 +05:30
Pramod Mahajan
172aab1b01 created GetListOfContact custome function 2025-05-26 12:29:44 +05:30
57dbfab32f Added DirectoryHelper in helper folder 2025-05-26 12:29:44 +05:30
0f70263ecb Added Migration for contact related tables 2025-05-26 12:29:44 +05:30
1fccbb4e3a An API skeleton has been added. 2025-05-26 12:29:44 +05:30
000cf74c1f Added Directory controller file 2025-05-26 12:29:44 +05:30
f30ae5ed5c Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-26 12:29:44 +05:30
ad4b618bee revert c7e89630eb494454c1322bdf4cf29ab076af7b86
revert Models, DTOs (Data Transfer Objects), and view models have been created for the directory.
2025-05-26 12:29:44 +05:30
b05c3509ad Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-26 12:29:44 +05:30
f1a7394aa2 Merge pull request 'Add Directory Management Feature with Permission Handling' (#73) from Ashutosh_Task#356_Directory_Management into Feature_Directory
Reviewed-on: #73
2025-05-24 10:46:51 +00:00
71aee738f4 Add Directory Management Feature with Permission Handling 2025-05-24 15:45:43 +05:30
bcca8cab80 Merge pull request 'Implemented an API to update Contact Category Master' (#69) from Ashutosh_Task#233_Update_Contact_Category into Feature_Directory
Reviewed-on: #69
2025-05-23 05:45:52 +00:00
7c09cf49e1 Implemented an API to update Contact Category Master 2025-05-23 05:45:52 +00:00
4801229f1e Merge pull request 'Implemented an API to update Buckets for grouping contacts.' (#68) from Ashutosh_Task#250_Update_Bucket into Feature_Directory
Reviewed-on: #68
2025-05-23 05:45:38 +00:00
a14bbb06a6 Implemented an API to update Buckets for grouping contacts. 2025-05-23 05:45:38 +00:00
95aef84a3a Accepting List of buckets and categories Ids rather than as payload 2025-05-22 22:10:51 +05:30
e0af0b5ba3 Merge pull request 'Implemented filtering functionality for Get Contact List API' (#67) from AshutoshEnhancement#332_Added_Filter_To_Contact_List into Feature_Directory
Reviewed-on: #67
2025-05-22 13:19:27 +00:00
23e8eedf17 Implemented filtering functionality for Get Contact List API 2025-05-22 17:26:51 +05:30
f6027131e3 Merge pull request 'Implemented an API to suspend a Contact' (#66) from Ashutosh_Task#263_Delete_Contact into Feature_Directory
Reviewed-on: #66
2025-05-22 06:13:50 +00:00
bb561187fb Update Marco.Pms.Services/Helpers/DirectoryHelper.cs
Added entrie to DirectoryUpdateLog Table
2025-05-22 06:13:50 +00:00
fe5e58dce0 Implemented an API to suspend a Contact 2025-05-22 06:13:50 +00:00
472cca4e0a Merge pull request 'created api for contact Tag Update' (#65) from pramod_Task-#237_Update_Contact_Tag into Feature_Directory
Reviewed-on: #65
2025-05-22 06:13:09 +00:00
Pramod Mahajan
9224aca3ff created api for contact Tag Update 2025-05-22 06:13:09 +00:00
a68e1ab74b Merge pull request 'Implemented an API to retrieve a list of organizations provided in the contacts.' (#64) from Ashutosh_Task#317_Get_Organization_List into Feature_Directory
Reviewed-on: #64
2025-05-21 07:43:24 +00:00
9fbf55eeb5 Implemented an API to retrieve a list of organizations provided in the contacts. 2025-05-21 10:28:17 +05:30
d1b899f846 Merge pull request 'Created an API to get contact profile by its Id' (#63) from Ashutosh_Task#230_Get_Contact_By_Id into Feature_Directory
Reviewed-on: #63
2025-05-20 08:17:43 +00:00
d8d234a838 changed all list in contact profile view model to non-nullable and set default value to empty list 2025-05-20 12:38:09 +05:30
6eea98c5a1 Created an API to get contact profile by its Id 2025-05-20 09:46:03 +05:30
5693bbba17 Changed tag validation 2025-05-19 13:18:32 +05:30
9767390636 Addd migrations fro Typo 2025-05-19 11:09:30 +05:30
24d2cbbfce Corrected the typo of ContactTagtId to ContactTagId 2025-05-19 10:57:17 +05:30
9f311237a9 Merge branch 'Feature_Directory' of https://git.marcoaiot.com/admin/marco.pms.api into Feature_Directory 2025-05-17 18:35:40 +05:30
6d38e005bc Added an API to add a note to specific contact 2025-05-17 18:35:31 +05:30
37eba7a47f Added an API to suspend a n existing Contact-note 2025-05-17 18:35:31 +05:30
1be23802c7 Added an API to Update existing Contact-note 2025-05-17 18:35:31 +05:30
0685a12c62 Added an API to get contact category by its size 2025-05-17 18:35:31 +05:30
18067732ed added an API to get a list of contact-notes by contact ID 2025-05-17 18:35:31 +05:30
c16f9a08d9 Added an API to deleted ContactTag as well remove entries in contact-tag mapping table related to that tag 2025-05-17 18:35:31 +05:30
c330023ee7 Added functionality to stop recreating tas of same name 2025-05-17 18:35:31 +05:30
8288a19dd8 properly mapped the updated Dto to contact table 2025-05-17 18:35:31 +05:30
8c938b545e Refetched the contact in update contact API 2025-05-17 18:35:31 +05:30
38e5ad664e added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-17 18:35:31 +05:30
54d6d5f1bd Added an API to delete existing contact category 2025-05-17 18:35:31 +05:30
326ceecdbf Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-05-17 18:35:31 +05:30
e78cc74246 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-17 18:35:31 +05:30
b50cda12b8 When checking in exsiting tag change Id from mapping Id to Tag ID 2025-05-17 18:35:30 +05:30
ccf339ca0b Added an API to create bucket 2025-05-17 18:35:30 +05:30
22be364a0a Fixed the errorof finding tag in wrong table 2025-05-17 18:35:30 +05:30
d86a85389e Added an API to create a contact tag 2025-05-17 18:35:30 +05:30
ccd28908d0 Added an API to Get a list of buckets Assigned to that employee 2025-05-17 18:35:30 +05:30
Pramod Mahajan
c803a570c4 added api to get list of contact tag 2025-05-17 18:35:30 +05:30
711b47ddf4 Added an API to update existing contact 2025-05-17 18:35:30 +05:30
c2223e4029 Created an endpoint to fetch list of all contact category in that tenant 2025-05-17 18:35:30 +05:30
84cfdc29b2 Created an API to create the Contact category 2025-05-17 18:35:30 +05:30
dac586f498 Added logs to the 'Get List of Contacts' endpoint. 2025-05-17 18:35:26 +05:30
dbaabb1728 Added an API to create contact and populate related tables as well 2025-05-17 18:34:47 +05:30
78f95d6f81 Added an API to create contact and populate related tables as well 2025-05-17 18:33:41 +05:30
Pramod Mahajan
13d6bf94d9 created GetListOfContact custome function 2025-05-17 18:33:41 +05:30
e3dfcb4ee0 Added DirectoryHelper in helper folder 2025-05-17 18:33:41 +05:30
7c37007a07 Added Migration for contact related tables 2025-05-17 18:33:41 +05:30
c2c486a11d An API skeleton has been added. 2025-05-17 18:33:41 +05:30
109c8bbb81 Added Directory controller file 2025-05-17 18:33:40 +05:30
d4d1a13228 Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-17 18:33:40 +05:30
c5ef5e5d7c revert c7e89630eb494454c1322bdf4cf29ab076af7b86
revert Models, DTOs (Data Transfer Objects), and view models have been created for the directory.
2025-05-17 18:33:40 +05:30
a4b1a25ced Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-17 18:33:40 +05:30
c0336513c4 Merge pull request 'Ashutosh_Contact_Note_CRUD' (#61) from Ashutosh_Contact_Note_CRUD into Feature_Directory
Reviewed-on: #61
2025-05-17 11:18:02 +00:00
077af5ac59 Added an API to add a note to specific contact 2025-05-17 16:45:43 +05:30
651785720f Added an API to suspend a n existing Contact-note 2025-05-17 16:45:10 +05:30
948457a83f Added an API to Update existing Contact-note 2025-05-17 16:44:24 +05:30
824dd45d4c Merge pull request 'Added an API to get contact category by its id' (#60) from Ashutosh_Task#234_Get_COntact_Category_By_Id into Feature_Directory
Reviewed-on: #60
2025-05-17 11:03:01 +00:00
37f0606bb0 Added an API to get contact category by its size 2025-05-17 11:03:01 +00:00
05dd8680da Merge pull request 'added an API to get a list of contact-notes by contact ID' (#59) from Ashutosh_Task#246_Get_Note_List_By_ContactID into Feature_Directory
Reviewed-on: #59
2025-05-17 11:02:34 +00:00
b0758a58ae added an API to get a list of contact-notes by contact ID 2025-05-17 16:13:35 +05:30
64e4525fcf Merge pull request 'Added an API to deleted ContactTag as well remove entries in contact-tag mapping table related to that tag' (#58) from Ashutosh_Task#266_Delete_Contact_Tag into Feature_Directory
Reviewed-on: #58
2025-05-17 09:48:06 +00:00
cbddc5c9ce Added an API to deleted ContactTag as well remove entries in contact-tag mapping table related to that tag 2025-05-17 09:48:06 +00:00
e97a83e7c0 Merge pull request 'added an API to get list of contacts by bucket id and added project- contact mapping table' (#56) from Ashutosh_Task#231_Get_Contact_By_BucketId into Feature_Directory
Reviewed-on: #56
2025-05-17 09:47:42 +00:00
1305742055 Added functionality to stop recreating tas of same name 2025-05-17 09:47:42 +00:00
895f22c62a properly mapped the updated Dto to contact table 2025-05-17 09:47:42 +00:00
f836f0dfb8 Refetched the contact in update contact API 2025-05-17 09:47:42 +00:00
823da8d2cb added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-17 09:47:42 +00:00
1d03ff0e09 Merge pull request 'Added an API to delete existing contact category' (#57) from Ashtush_Task#265_Delete_Contact_Category into Feature_Directory
Reviewed-on: #57
2025-05-17 08:52:12 +00:00
9f543d1859 Added an API to delete existing contact category 2025-05-17 12:15:23 +05:30
801e0e1805 Revert "added an API to get list of contacts by bucket id and added project- contact mapping table"
This reverts commit 22f777ca87053d2c79db610a27b8d7a5169e57bc.
2025-05-17 11:53:48 +05:30
22f777ca87 added an API to get list of contacts by bucket id and added project- contact mapping table 2025-05-17 11:52:45 +05:30
0236c87540 Merge pull request 'Added an API to create bucket' (#55) from Ashutosh_Task#249_Create_Bucket into Feature_Directory
Reviewed-on: #55
2025-05-17 04:42:02 +00:00
6a456001fd When checking in exsiting tag change Id from mapping Id to Tag ID 2025-05-17 04:42:02 +00:00
da552afb0d Added an API to create bucket 2025-05-17 04:42:02 +00:00
99c56bc9dd Merge pull request 'Added an API to create a contact tag' (#54) from Ashutosh_Tasl#236_Create_ContactTag into Feature_Directory
Reviewed-on: #54
2025-05-17 04:41:47 +00:00
455f51f4bd Fixed the errorof finding tag in wrong table 2025-05-15 22:38:24 +05:30
103bdcfb0b Added an API to create a contact tag 2025-05-15 22:30:29 +05:30
2429e20566 Added an API to Get a list of buckets Assigned to that employee 2025-05-15 19:26:55 +05:30
24ee3f685a Merge pull request 'added api to get list of contact tag' (#53) from pramod_Task#238 into Feature_Directory
Reviewed-on: #53
2025-05-15 13:26:11 +00:00
Pramod Mahajan
94f3fad09f added api to get list of contact tag 2025-05-15 13:26:11 +00:00
fc6ecd059c Merge pull request 'Added an API to update existing contact' (#52) from Ashutosh_Task#228_Update_Contact into Feature_Directory
Reviewed-on: #52
2025-05-15 13:17:24 +00:00
b6a5e4562f Added an API to update existing contact 2025-05-15 13:17:24 +00:00
4d508f43eb Merge pull request 'Created an endpoint to fetch list of all contact category in that tenant' (#51) from Ashutosh_Task#235_Get_Contact_Category_List into Feature_Directory
Reviewed-on: #51
2025-05-15 12:28:15 +00:00
e61289ed1b Created an endpoint to fetch list of all contact category in that tenant 2025-05-15 14:59:30 +05:30
173b23f7d3 Merge pull request 'Added endpoint to create a contact category with existence validation. Returns appropriate message or created category VM.' (#50) from Ashutosh_Task#229_Create_Contact_Category into Feature_Directory
Reviewed-on: #50
2025-05-15 07:44:08 +00:00
7bd3b3816f Created an API to create the Contact category 2025-05-15 12:51:23 +05:30
481b01a53f Merge pull request 'Ashutosh_Task#226_Create_Contact' (#49) from Ashutosh_Task#226_Create_Contact into Feature_Directory
Reviewed-on: #49
2025-05-15 06:46:07 +00:00
95129be836 Added logs to the 'Get List of Contacts' endpoint. 2025-05-15 11:38:31 +05:30
27a445b519 Merge branch 'Ashutosh_Task#226_Create_Contact' of https://git.marcoaiot.com/admin/marco.pms.api into Ashutosh_Task#226_Create_Contact 2025-05-15 11:25:16 +05:30
f6e4684ecb Added an API to create contact and populate related tables as well 2025-05-15 11:21:47 +05:30
fa09b1a868 Merge pull request 'Implemented Get Contact List API by TenantId' (#48) from pramod_Task#282 into Feature_Directory
Reviewed-on: #48
2025-05-15 05:47:00 +00:00
Pramod Mahajan
c52079c4db created GetListOfContact custome function 2025-05-15 11:06:46 +05:30
289b086cb3 Added an API to create contact and populate related tables as well 2025-05-15 10:52:04 +05:30
c8a18bbdba Added DirectoryHelper in helper folder 2025-05-14 17:51:57 +05:30
a960866c21 Added Migration for contact related tables 2025-05-14 16:10:07 +05:30
261a75511e An API skeleton has been added. 2025-05-14 15:44:30 +05:30
0d0e9c38b6 Added Directory controller file 2025-05-14 15:38:47 +05:30
3059257fd3 Merge pull request 'Models, DTOs (Data Transfer Objects), and view models have been created for the directory.' (#47) from Ashutosh_Task#124_Models_And_Dto into Feature_Directory
Reviewed-on: #47
2025-05-14 10:03:53 +00:00
1092c37609 Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-14 15:27:36 +05:30
abc2415b5b revert c7e89630eb494454c1322bdf4cf29ab076af7b86
revert Models, DTOs (Data Transfer Objects), and view models have been created for the directory.
2025-05-14 09:51:01 +00:00
c7e89630eb Models, DTOs (Data Transfer Objects), and view models have been created for the directory. 2025-05-14 15:17:05 +05:30
67 changed files with 19085 additions and 12 deletions

View File

@ -2,6 +2,7 @@
using Marco.Pms.Model.Activities;
using Marco.Pms.Model.AttendanceModule;
using Marco.Pms.Model.Authentication;
using Marco.Pms.Model.Directory;
using Marco.Pms.Model.DocumentManager;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Entitlements;
@ -67,6 +68,19 @@ namespace Marco.Pms.DataAccess.Data
public DbSet<Document> Documents { get; set; }
public DbSet<TicketTag> TicketTags { get; set; }
public DbSet<WorkCategoryMaster> WorkCategoryMasters { get; set; }
public DbSet<Contact> Contacts { get; set; }
public DbSet<ContactCategoryMaster> ContactCategoryMasters { get; set; }
public DbSet<ContactEmail> ContactsEmails { get; set; }
public DbSet<ContactPhone> ContactsPhones { get; set; }
public DbSet<ContactNote> ContactNotes { get; set; }
public DbSet<Bucket> Buckets { get; set; }
public DbSet<ContactTagMaster> ContactTagMasters { get; set; }
public DbSet<ContactTagMapping> ContactTagMappings { get; set; }
public DbSet<EmployeeBucketMapping> EmployeeBucketMappings { get; set; }
public DbSet<ContactBucketMapping> ContactBucketMappings { get; set; }
public DbSet<ContactProjectMapping> ContactProjectMappings { get; set; }
public DbSet<DirectoryUpdateLog> DirectoryUpdateLogs { get; set; }
public DbSet<MailingList> MailingList { get; set; }
public DbSet<MailDetails> MailDetails { get; set; }
public DbSet<MailLog> MailLogs { get; set; }
@ -466,17 +480,15 @@ namespace Marco.Pms.DataAccess.Data
modelBuilder.Entity<Feature>().HasData(
new Feature { Id = new Guid("53176ebf-c75d-42e5-839f-4508ffac3def"), Description = "Manage Project", Name = "Manage Project", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
new Feature { Id = new Guid("9666de86-d7c7-4d3d-acaa-fcd6d6b81f3c"), Description = "Manage Infra", Name = "Manage Infra", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
new Feature { Id = new Guid("9d4b5489-2079-40b9-bd77-6e1bf90bc19f"), Description = "Manage Tasks", Name = "Task Management", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
//new Feature { Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), Description = "Assign and Update Tasks Progress", Name = "Assign and Update Tasks Progress", ModuleId = new Guid("bf59fd88-b57a-4d67-bf01-3780f385896b"), IsActive = true },
new Feature { Id = new Guid("81ab8a87-8ccd-4015-a917-0627cee6a100"), Description = "Manage Employee", Name = "Employee Management", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
new Feature { Id = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), Description = "Attendance", Name = "Attendance", ModuleId = new Guid("2a231490-bcb1-4bdd-91f1-f25fb7f25b23"), IsActive = true },
new Feature { Id = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), Description = "Global Masters", Name = "Global Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true }
//new Feature { Id = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), Description = "Tenant Masters", Name = "Tenant Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true }
new Feature { Id = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), Description = "Global Masters", Name = "Global Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true },
new Feature { Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), Description = "Managing all directory related rights", Name = "Directory Management", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true }
//new Feature { Id = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), Description = "Tenant Masters", Name = "Tenant Masters", ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), IsActive = true }
);
modelBuilder.Entity<FeaturePermission>().HasData(
@ -504,8 +516,11 @@ namespace Marco.Pms.DataAccess.Data
new FeaturePermission { Id = new Guid("ccb0589f-712b-43de-92ed-5b6088e7dc4e"), FeatureId = new Guid("52c9cf54-1eb2-44d2-81bb-524cf29c0a94"), IsEnabled = true, Name = "Self Attendance", Description = "Team Attendance refers to tracking and managing the attendance of all team members collectively, often monitored by a team lead or manager." },
new FeaturePermission { Id = new Guid("5ffbafe0-7ab0-48b1-bb50-c1bf76b65f9d"), FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), IsEnabled = true, Name = "View Masters", Description = "Grants a user read-only access to foundational or reference data within the system. \"Masters\" typically refer to predefined lists, categories, or templates that are used throughout the application to standardize information and maintain consistency" },
new FeaturePermission { Id = new Guid("588a8824-f924-4955-82d8-fc51956cf323"), FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), IsEnabled = true, Name = "Manage Masters", Description = "Grants a user the authority to create, modify, and delete foundational or reference data within the system. These \"masters\" are typically the core lists, categories, and configurations that other data and functionalities rely upon, such as departments, job titles, product categories" }
//new FeaturePermission { Id = new Guid("cb8ec407-46d4-4467-930c-69127cda6dec"), FeatureId = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), IsEnabled = true, Name = "View Masters", Description = "" },
new FeaturePermission { Id = new Guid("588a8824-f924-4955-82d8-fc51956cf323"), FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"), IsEnabled = true, Name = "Manage Masters", Description = "Grants a user the authority to create, modify, and delete foundational or reference data within the system. These \"masters\" are typically the core lists, categories, and configurations that other data and functionalities rely upon, such as departments, job titles, product categories" },
new FeaturePermission { Id = new Guid("4286a13b-bb40-4879-8c6d-18e9e393beda"), FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), IsEnabled = true, Name = "Directory Admin", Description = "Full control over all directories, including the ability to manage permissions for all directories in the system." },
new FeaturePermission { Id = new Guid("62668630-13ce-4f52-a0f0-db38af2230c5"), FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), IsEnabled = true, Name = "Directory Manager", Description = "Full control over directories they created or have been assigned. Can also manage permissions for those directories." },
new FeaturePermission { Id = new Guid("0f919170-92d4-4337-abd3-49b66fc871bb"), FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), IsEnabled = true, Name = "Directory User", Description = "Full control over directories they created. Can view contacts in directories they either created or were assigned to. Can manage permissions only for directories they created." }
//new FeaturePermission { Id = new Guid("6b1a6d97-a951-4de5-9b19-709bac7c4f18"), FeatureId = new Guid("660131a4-788c-4739-a082-cbbf7879cbf2"), IsEnabled = true, Name = "Manage Masters", Description = "" }
);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,438 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Added_Directory_Related_Tables : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "Buckets",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_Buckets", x => x.Id);
table.ForeignKey(
name: "FK_Buckets_Tenants_TenantId",
column: x => x.TenantId,
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ContactCategoryMasters",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_ContactCategoryMasters", x => x.Id);
table.ForeignKey(
name: "FK_ContactCategoryMasters_Tenants_TenantId",
column: x => x.TenantId,
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ContactTagMasters",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_ContactTagMasters", x => x.Id);
table.ForeignKey(
name: "FK_ContactTagMasters_Tenants_TenantId",
column: x => x.TenantId,
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "DirectoryUpdateLogs",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
RefereanceId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
UpdateAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
UpdatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_DirectoryUpdateLogs", x => x.Id);
table.ForeignKey(
name: "FK_DirectoryUpdateLogs_Employees_UpdatedById",
column: x => x.UpdatedById,
principalTable: "Employees",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "EmployeeBucketMappings",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
BucketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
EmployeeId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_EmployeeBucketMappings", x => x.Id);
table.ForeignKey(
name: "FK_EmployeeBucketMappings_Buckets_BucketId",
column: x => x.BucketId,
principalTable: "Buckets",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_EmployeeBucketMappings_Employees_EmployeeId",
column: x => x.EmployeeId,
principalTable: "Employees",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "Contacts",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ProjectId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
Name = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Description = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Organization = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
Address = table.Column<string>(type: "longtext", nullable: true)
.Annotation("MySql:CharSet", "utf8mb4"),
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ContactCategoryId = table.Column<Guid>(type: "char(36)", nullable: true, collation: "ascii_general_ci"),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_Contacts", x => x.Id);
table.ForeignKey(
name: "FK_Contacts_ContactCategoryMasters_ContactCategoryId",
column: x => x.ContactCategoryId,
principalTable: "ContactCategoryMasters",
principalColumn: "Id");
table.ForeignKey(
name: "FK_Contacts_Employees_CreatedById",
column: x => x.CreatedById,
principalTable: "Employees",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_Contacts_Tenants_TenantId",
column: x => x.TenantId,
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ContactBucketMappings",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
BucketId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ContactId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_ContactBucketMappings", x => x.Id);
table.ForeignKey(
name: "FK_ContactBucketMappings_Buckets_BucketId",
column: x => x.BucketId,
principalTable: "Buckets",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ContactBucketMappings_Contacts_ContactId",
column: x => x.ContactId,
principalTable: "Contacts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ContactNotes",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Note = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
CreatedById = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
CreatedAt = table.Column<DateTime>(type: "datetime(6)", nullable: false),
ContactId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
IsActive = table.Column<bool>(type: "tinyint(1)", nullable: false),
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_ContactNotes", x => x.Id);
table.ForeignKey(
name: "FK_ContactNotes_Contacts_ContactId",
column: x => x.ContactId,
principalTable: "Contacts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ContactNotes_Employees_CreatedById",
column: x => x.CreatedById,
principalTable: "Employees",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ContactNotes_Tenants_TenantId",
column: x => x.TenantId,
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ContactsEmails",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Label = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
EmailAddress = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ContactId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
IsPrimary = table.Column<bool>(type: "tinyint(1)", nullable: false),
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_ContactsEmails", x => x.Id);
table.ForeignKey(
name: "FK_ContactsEmails_Contacts_ContactId",
column: x => x.ContactId,
principalTable: "Contacts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ContactsPhones",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
Label = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
PhoneNumber = table.Column<string>(type: "longtext", nullable: false)
.Annotation("MySql:CharSet", "utf8mb4"),
ContactId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
IsPrimary = table.Column<bool>(type: "tinyint(1)", nullable: false),
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_ContactsPhones", x => x.Id);
table.ForeignKey(
name: "FK_ContactsPhones_Contacts_ContactId",
column: x => x.ContactId,
principalTable: "Contacts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateTable(
name: "ContactTagMappings",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ContactId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ContactTagId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_ContactTagMappings", x => x.Id);
table.ForeignKey(
name: "FK_ContactTagMappings_ContactTagMasters_ContactTagId",
column: x => x.ContactTagId,
principalTable: "ContactTagMasters",
principalColumn: "Id");
table.ForeignKey(
name: "FK_ContactTagMappings_Contacts_ContactId",
column: x => x.ContactId,
principalTable: "Contacts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_Buckets_TenantId",
table: "Buckets",
column: "TenantId");
migrationBuilder.CreateIndex(
name: "IX_ContactBucketMappings_BucketId",
table: "ContactBucketMappings",
column: "BucketId");
migrationBuilder.CreateIndex(
name: "IX_ContactBucketMappings_ContactId",
table: "ContactBucketMappings",
column: "ContactId");
migrationBuilder.CreateIndex(
name: "IX_ContactCategoryMasters_TenantId",
table: "ContactCategoryMasters",
column: "TenantId");
migrationBuilder.CreateIndex(
name: "IX_ContactNotes_ContactId",
table: "ContactNotes",
column: "ContactId");
migrationBuilder.CreateIndex(
name: "IX_ContactNotes_CreatedById",
table: "ContactNotes",
column: "CreatedById");
migrationBuilder.CreateIndex(
name: "IX_ContactNotes_TenantId",
table: "ContactNotes",
column: "TenantId");
migrationBuilder.CreateIndex(
name: "IX_Contacts_ContactCategoryId",
table: "Contacts",
column: "ContactCategoryId");
migrationBuilder.CreateIndex(
name: "IX_Contacts_CreatedById",
table: "Contacts",
column: "CreatedById");
migrationBuilder.CreateIndex(
name: "IX_Contacts_TenantId",
table: "Contacts",
column: "TenantId");
migrationBuilder.CreateIndex(
name: "IX_ContactsEmails_ContactId",
table: "ContactsEmails",
column: "ContactId");
migrationBuilder.CreateIndex(
name: "IX_ContactsPhones_ContactId",
table: "ContactsPhones",
column: "ContactId");
migrationBuilder.CreateIndex(
name: "IX_ContactTagMappings_ContactId",
table: "ContactTagMappings",
column: "ContactId");
migrationBuilder.CreateIndex(
name: "IX_ContactTagMappings_ContactTagId",
table: "ContactTagMappings",
column: "ContactTagId");
migrationBuilder.CreateIndex(
name: "IX_ContactTagMasters_TenantId",
table: "ContactTagMasters",
column: "TenantId");
migrationBuilder.CreateIndex(
name: "IX_DirectoryUpdateLogs_UpdatedById",
table: "DirectoryUpdateLogs",
column: "UpdatedById");
migrationBuilder.CreateIndex(
name: "IX_EmployeeBucketMappings_BucketId",
table: "EmployeeBucketMappings",
column: "BucketId");
migrationBuilder.CreateIndex(
name: "IX_EmployeeBucketMappings_EmployeeId",
table: "EmployeeBucketMappings",
column: "EmployeeId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ContactBucketMappings");
migrationBuilder.DropTable(
name: "ContactNotes");
migrationBuilder.DropTable(
name: "ContactsEmails");
migrationBuilder.DropTable(
name: "ContactsPhones");
migrationBuilder.DropTable(
name: "ContactTagMappings");
migrationBuilder.DropTable(
name: "DirectoryUpdateLogs");
migrationBuilder.DropTable(
name: "EmployeeBucketMappings");
migrationBuilder.DropTable(
name: "ContactTagMasters");
migrationBuilder.DropTable(
name: "Contacts");
migrationBuilder.DropTable(
name: "Buckets");
migrationBuilder.DropTable(
name: "ContactCategoryMasters");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,81 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Added_ContactProjectMapping_Table : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ProjectId",
table: "Contacts");
migrationBuilder.CreateTable(
name: "ContactProjectMappings",
columns: table => new
{
Id = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ProjectId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
ContactId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci"),
TenantId = table.Column<Guid>(type: "char(36)", nullable: false, collation: "ascii_general_ci")
},
constraints: table =>
{
table.PrimaryKey("PK_ContactProjectMappings", x => x.Id);
table.ForeignKey(
name: "FK_ContactProjectMappings_Contacts_ContactId",
column: x => x.ContactId,
principalTable: "Contacts",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ContactProjectMappings_Projects_ProjectId",
column: x => x.ProjectId,
principalTable: "Projects",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_ContactProjectMappings_Tenants_TenantId",
column: x => x.TenantId,
principalTable: "Tenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
})
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.CreateIndex(
name: "IX_ContactProjectMappings_ContactId",
table: "ContactProjectMappings",
column: "ContactId");
migrationBuilder.CreateIndex(
name: "IX_ContactProjectMappings_ProjectId",
table: "ContactProjectMappings",
column: "ProjectId");
migrationBuilder.CreateIndex(
name: "IX_ContactProjectMappings_TenantId",
table: "ContactProjectMappings",
column: "TenantId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "ContactProjectMappings");
migrationBuilder.AddColumn<Guid>(
name: "ProjectId",
table: "Contacts",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,64 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Fixed_Typo_Of_ColumnName : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ContactTagMappings_ContactTagMasters_ContactTagId",
table: "ContactTagMappings");
migrationBuilder.AlterColumn<Guid>(
name: "ContactTagId",
table: "ContactTagMappings",
type: "char(36)",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
collation: "ascii_general_ci",
oldClrType: typeof(Guid),
oldType: "char(36)",
oldNullable: true)
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.AddForeignKey(
name: "FK_ContactTagMappings_ContactTagMasters_ContactTagId",
table: "ContactTagMappings",
column: "ContactTagId",
principalTable: "ContactTagMasters",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_ContactTagMappings_ContactTagMasters_ContactTagId",
table: "ContactTagMappings");
migrationBuilder.AlterColumn<Guid>(
name: "ContactTagId",
table: "ContactTagMappings",
type: "char(36)",
nullable: true,
collation: "ascii_general_ci",
oldClrType: typeof(Guid),
oldType: "char(36)")
.OldAnnotation("Relational:Collation", "ascii_general_ci");
migrationBuilder.AddForeignKey(
name: "FK_ContactTagMappings_ContactTagMasters_ContactTagId",
table: "ContactTagMappings",
column: "ContactTagId",
principalTable: "ContactTagMasters",
principalColumn: "Id");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,100 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Added_Feature_Directory_Management : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<DateTime>(
name: "CreatedAt",
table: "Buckets",
type: "datetime(6)",
nullable: false,
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified));
migrationBuilder.AddColumn<Guid>(
name: "CreatedByID",
table: "Buckets",
type: "char(36)",
nullable: false,
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
collation: "ascii_general_ci");
migrationBuilder.InsertData(
table: "Features",
columns: new[] { "Id", "Description", "IsActive", "ModuleId", "Name" },
values: new object[] { new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), "Managing all directory related rights", true, new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"), "Directory Management" });
migrationBuilder.InsertData(
table: "FeaturePermissions",
columns: new[] { "Id", "Description", "FeatureId", "IsEnabled", "Name" },
values: new object[,]
{
{ new Guid("0f919170-92d4-4337-abd3-49b66fc871bb"), "Full control over directories they created. Can view contacts in directories they either created or were assigned to. Can manage permissions only for directories they created.", new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), true, "Directory User" },
{ new Guid("4286a13b-bb40-4879-8c6d-18e9e393beda"), "Full control over all directories, including the ability to manage permissions for all directories in the system.", new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), true, "Directory Admin" },
{ new Guid("62668630-13ce-4f52-a0f0-db38af2230c5"), "Full control over directories they created or have been assigned. Can also manage permissions for those directories.", new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"), true, "Directory Manager" }
});
migrationBuilder.CreateIndex(
name: "IX_Buckets_CreatedByID",
table: "Buckets",
column: "CreatedByID");
migrationBuilder.AddForeignKey(
name: "FK_Buckets_Employees_CreatedByID",
table: "Buckets",
column: "CreatedByID",
principalTable: "Employees",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_Buckets_Employees_CreatedByID",
table: "Buckets");
migrationBuilder.DropIndex(
name: "IX_Buckets_CreatedByID",
table: "Buckets");
migrationBuilder.DeleteData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("0f919170-92d4-4337-abd3-49b66fc871bb"));
migrationBuilder.DeleteData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("4286a13b-bb40-4879-8c6d-18e9e393beda"));
migrationBuilder.DeleteData(
table: "FeaturePermissions",
keyColumn: "Id",
keyValue: new Guid("62668630-13ce-4f52-a0f0-db38af2230c5"));
migrationBuilder.DeleteData(
table: "Features",
keyColumn: "Id",
keyValue: new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"));
migrationBuilder.DropColumn(
name: "CreatedAt",
table: "Buckets");
migrationBuilder.DropColumn(
name: "CreatedByID",
table: "Buckets");
}
}
}

View File

@ -0,0 +1,37 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Marco.Pms.DataAccess.Migrations
{
/// <inheritdoc />
public partial class Added_Short_Name_Column_In_Projects_Table : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<string>(
name: "ShortName",
table: "Projects",
type: "longtext",
nullable: true)
.Annotation("MySql:CharSet", "utf8mb4");
migrationBuilder.UpdateData(
table: "Projects",
keyColumn: "Id",
keyValue: new Guid("85bf587b-7ca9-4685-b77c-d817f5847e85"),
column: "ShortName",
value: null);
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ShortName",
table: "Projects");
}
}
}

View File

@ -325,6 +325,340 @@ namespace Marco.Pms.DataAccess.Migrations
b.ToTable("RefreshTokens");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.Bucket", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<Guid>("CreatedByID")
.HasColumnType("char(36)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("TenantId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("CreatedByID");
b.HasIndex("TenantId");
b.ToTable("Buckets");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.Contact", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<string>("Address")
.HasColumnType("longtext");
b.Property<Guid?>("ContactCategoryId")
.HasColumnType("char(36)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<Guid>("CreatedById")
.HasColumnType("char(36)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Organization")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("TenantId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ContactCategoryId");
b.HasIndex("CreatedById");
b.HasIndex("TenantId");
b.ToTable("Contacts");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactBucketMapping", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<Guid>("BucketId")
.HasColumnType("char(36)");
b.Property<Guid>("ContactId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("BucketId");
b.HasIndex("ContactId");
b.ToTable("ContactBucketMappings");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactCategoryMaster", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("TenantId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("TenantId");
b.ToTable("ContactCategoryMasters");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactEmail", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<Guid>("ContactId")
.HasColumnType("char(36)");
b.Property<string>("EmailAddress")
.IsRequired()
.HasColumnType("longtext");
b.Property<bool>("IsPrimary")
.HasColumnType("tinyint(1)");
b.Property<string>("Label")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("TenantId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ContactId");
b.ToTable("ContactsEmails");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactNote", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<Guid>("ContactId")
.HasColumnType("char(36)");
b.Property<DateTime>("CreatedAt")
.HasColumnType("datetime(6)");
b.Property<Guid>("CreatedById")
.HasColumnType("char(36)");
b.Property<bool>("IsActive")
.HasColumnType("tinyint(1)");
b.Property<string>("Note")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("TenantId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ContactId");
b.HasIndex("CreatedById");
b.HasIndex("TenantId");
b.ToTable("ContactNotes");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactPhone", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<Guid>("ContactId")
.HasColumnType("char(36)");
b.Property<bool>("IsPrimary")
.HasColumnType("tinyint(1)");
b.Property<string>("Label")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("PhoneNumber")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("TenantId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ContactId");
b.ToTable("ContactsPhones");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactProjectMapping", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<Guid>("ContactId")
.HasColumnType("char(36)");
b.Property<Guid>("ProjectId")
.HasColumnType("char(36)");
b.Property<Guid>("TenantId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ContactId");
b.HasIndex("ProjectId");
b.HasIndex("TenantId");
b.ToTable("ContactProjectMappings");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactTagMapping", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<Guid>("ContactId")
.HasColumnType("char(36)");
b.Property<Guid>("ContactTagId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("ContactId");
b.HasIndex("ContactTagId");
b.ToTable("ContactTagMappings");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactTagMaster", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<string>("Description")
.IsRequired()
.HasColumnType("longtext");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("longtext");
b.Property<Guid>("TenantId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("TenantId");
b.ToTable("ContactTagMasters");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.DirectoryUpdateLog", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<Guid>("RefereanceId")
.HasColumnType("char(36)");
b.Property<DateTime>("UpdateAt")
.HasColumnType("datetime(6)");
b.Property<Guid>("UpdatedById")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("UpdatedById");
b.ToTable("DirectoryUpdateLogs");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.EmployeeBucketMapping", b =>
{
b.Property<Guid>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("char(36)");
b.Property<Guid>("BucketId")
.HasColumnType("char(36)");
b.Property<Guid>("EmployeeId")
.HasColumnType("char(36)");
b.HasKey("Id");
b.HasIndex("BucketId");
b.HasIndex("EmployeeId");
b.ToTable("EmployeeBucketMappings");
});
modelBuilder.Entity("Marco.Pms.Model.DocumentManager.Document", b =>
{
b.Property<Guid>("Id")
@ -705,6 +1039,30 @@ namespace Marco.Pms.DataAccess.Migrations
FeatureId = new Guid("be3b3afc-6ccf-4566-b9b6-aafcb65546be"),
IsEnabled = true,
Name = "Manage Masters"
},
new
{
Id = new Guid("4286a13b-bb40-4879-8c6d-18e9e393beda"),
Description = "Full control over all directories, including the ability to manage permissions for all directories in the system.",
FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"),
IsEnabled = true,
Name = "Directory Admin"
},
new
{
Id = new Guid("62668630-13ce-4f52-a0f0-db38af2230c5"),
Description = "Full control over directories they created or have been assigned. Can also manage permissions for those directories.",
FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"),
IsEnabled = true,
Name = "Directory Manager"
},
new
{
Id = new Guid("0f919170-92d4-4337-abd3-49b66fc871bb"),
Description = "Full control over directories they created. Can view contacts in directories they either created or were assigned to. Can manage permissions only for directories they created.",
FeatureId = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"),
IsEnabled = true,
Name = "Directory User"
});
});
@ -1140,6 +1498,14 @@ namespace Marco.Pms.DataAccess.Migrations
IsActive = true,
ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"),
Name = "Global Masters"
},
new
{
Id = new Guid("39e66f81-efc6-446c-95bd-46bff6cfb606"),
Description = "Managing all directory related rights",
IsActive = true,
ModuleId = new Guid("c43db8c7-ab73-47f4-9d3b-f83e81357924"),
Name = "Directory Management"
});
});
@ -1610,6 +1976,9 @@ namespace Marco.Pms.DataAccess.Migrations
b.Property<Guid>("ProjectStatusId")
.HasColumnType("char(36)");
b.Property<string>("ShortName")
.HasColumnType("longtext");
b.Property<DateTime?>("StartDate")
.HasColumnType("datetime(6)");
@ -2212,6 +2581,216 @@ namespace Marco.Pms.DataAccess.Migrations
b.Navigation("User");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.Bucket", b =>
{
b.HasOne("Marco.Pms.Model.Employees.Employee", "CreatedBy")
.WithMany()
.HasForeignKey("CreatedByID")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
.WithMany()
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("CreatedBy");
b.Navigation("Tenant");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.Contact", b =>
{
b.HasOne("Marco.Pms.Model.Directory.ContactCategoryMaster", "ContactCategory")
.WithMany()
.HasForeignKey("ContactCategoryId");
b.HasOne("Marco.Pms.Model.Employees.Employee", "CreatedBy")
.WithMany()
.HasForeignKey("CreatedById")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
.WithMany()
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("ContactCategory");
b.Navigation("CreatedBy");
b.Navigation("Tenant");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactBucketMapping", b =>
{
b.HasOne("Marco.Pms.Model.Directory.Bucket", "Bucket")
.WithMany()
.HasForeignKey("BucketId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Marco.Pms.Model.Directory.Contact", "Contact")
.WithMany()
.HasForeignKey("ContactId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Bucket");
b.Navigation("Contact");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactCategoryMaster", b =>
{
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
.WithMany()
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Tenant");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactEmail", b =>
{
b.HasOne("Marco.Pms.Model.Directory.Contact", "Contact")
.WithMany()
.HasForeignKey("ContactId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Contact");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactNote", b =>
{
b.HasOne("Marco.Pms.Model.Directory.Contact", "Contact")
.WithMany()
.HasForeignKey("ContactId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Marco.Pms.Model.Employees.Employee", "Createdby")
.WithMany()
.HasForeignKey("CreatedById")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
.WithMany()
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Contact");
b.Navigation("Createdby");
b.Navigation("Tenant");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactPhone", b =>
{
b.HasOne("Marco.Pms.Model.Directory.Contact", "Contact")
.WithMany()
.HasForeignKey("ContactId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Contact");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactProjectMapping", b =>
{
b.HasOne("Marco.Pms.Model.Directory.Contact", "Contact")
.WithMany()
.HasForeignKey("ContactId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Marco.Pms.Model.Projects.Project", "Project")
.WithMany()
.HasForeignKey("ProjectId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
.WithMany()
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Contact");
b.Navigation("Project");
b.Navigation("Tenant");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactTagMapping", b =>
{
b.HasOne("Marco.Pms.Model.Directory.Contact", "Contact")
.WithMany()
.HasForeignKey("ContactId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Marco.Pms.Model.Directory.ContactTagMaster", "ContactTag")
.WithMany()
.HasForeignKey("ContactTagId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Contact");
b.Navigation("ContactTag");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.ContactTagMaster", b =>
{
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")
.WithMany()
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Tenant");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.DirectoryUpdateLog", b =>
{
b.HasOne("Marco.Pms.Model.Employees.Employee", "Employee")
.WithMany()
.HasForeignKey("UpdatedById")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Employee");
});
modelBuilder.Entity("Marco.Pms.Model.Directory.EmployeeBucketMapping", b =>
{
b.HasOne("Marco.Pms.Model.Directory.Bucket", "Bucket")
.WithMany()
.HasForeignKey("BucketId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.HasOne("Marco.Pms.Model.Employees.Employee", "Employee")
.WithMany()
.HasForeignKey("EmployeeId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("Bucket");
b.Navigation("Employee");
});
modelBuilder.Entity("Marco.Pms.Model.DocumentManager.Document", b =>
{
b.HasOne("Marco.Pms.Model.Entitlements.Tenant", "Tenant")

View File

@ -0,0 +1,15 @@
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Utilities;
namespace Marco.Pms.Model.Directory
{
public class Bucket : TenantRelation
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public Guid CreatedByID { get; set; }
public Employee? CreatedBy { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public string Description { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,31 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Directory
{
public class Contact : TenantRelation
{
public Guid Id { get; set; }
//public Guid? ProjectId { get; set; }
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
public string Organization { get; set; } = string.Empty;
public string? Address { get; set; }
public bool IsActive { get; set; } = true;
public Guid CreatedById { get; set; }
[ValidateNever]
[ForeignKey("CreatedById")]
public Employee? CreatedBy { get; set; }
[DisplayName("ContactCategoryId")]
public Guid? ContactCategoryId { get; set; }
[ValidateNever]
[ForeignKey(nameof(ContactCategoryId))]
public ContactCategoryMaster? ContactCategory { get; set; }
public DateTime CreatedAt { get; set; }
}
}

View File

@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Directory
{
public class ContactBucketMapping
{
public Guid Id { get; set; }
public Guid BucketId { get; set; }
[ValidateNever]
[ForeignKey("BucketId")]
public Bucket? Bucket { get; set; }
public Guid ContactId { get; set; }
[ValidateNever]
[ForeignKey("ContactId")]
public Contact? Contact { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using Marco.Pms.Model.Utilities;
namespace Marco.Pms.Model.Directory
{
public class ContactCategoryMaster : TenantRelation
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,21 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Directory
{
public class ContactEmail
{
public Guid Id { get; set; }
public string Label { get; set; } = string.Empty;
public string EmailAddress { get; set; } = string.Empty;
[DisplayName("ContactId")]
public Guid ContactId { get; set; }
[ValidateNever]
[ForeignKey(nameof(ContactId))]
public Contact? Contact { get; set; }
public bool IsPrimary { get; set; }
public Guid TenantId { get; set; }
}
}

View File

@ -0,0 +1,25 @@
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Directory
{
public class ContactNote : TenantRelation
{
public Guid Id { get; set; }
public string Note { get; set; } = string.Empty;
public Guid CreatedById { get; set; }
[ValidateNever]
[ForeignKey("CreatedById")]
public Employee? Createdby { get; set; }
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
public Guid ContactId { get; set; }
[ValidateNever]
[ForeignKey("ContactId")]
public Contact? Contact { get; set; }
public bool IsActive { get; set; } = true;
}
}

View File

@ -0,0 +1,22 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Directory
{
public class ContactPhone
{
public Guid Id { get; set; }
public string Label { get; set; } = string.Empty;
public string PhoneNumber { get; set; } = string.Empty;
[DisplayName("ContactId")]
public Guid ContactId { get; set; }
[ValidateNever]
[ForeignKey(nameof(ContactId))]
public Contact? Contact { get; set; }
public bool IsPrimary { get; set; }
public Guid TenantId { get; set; }
}
}

View File

@ -0,0 +1,20 @@
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Projects;
using Marco.Pms.Model.Utilities;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Directory
{
public class ContactProjectMapping : TenantRelation
{
public Guid Id { get; set; }
public Guid ProjectId { get; set; }
[ValidateNever]
[ForeignKey("ProjectId")]
public Project? Project { get; set; }
public Guid ContactId { get; set; }
[ValidateNever]
[ForeignKey("ContactId")]
public Contact? Contact { get; set; }
}
}

View File

@ -0,0 +1,11 @@
namespace Marco.Pms.Model.Directory
{
public class ContactTagMapping
{
public Guid Id { get; set; }
public Guid ContactId { get; set; }
public Contact? Contact { get; set; }
public Guid ContactTagId { get; set; }
public ContactTagMaster? ContactTag { get; set; }
}
}

View File

@ -0,0 +1,11 @@
using Marco.Pms.Model.Utilities;
namespace Marco.Pms.Model.Directory
{
public class ContactTagMaster : TenantRelation
{
public Guid Id { get; set; }
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,18 @@
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Employees;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Directory
{
public class DirectoryUpdateLog
{
public Guid Id { get; set; }
public Guid RefereanceId { get; set; }
public DateTime UpdateAt { get; set; } = DateTime.UtcNow;
public Guid UpdatedById { get; set; }
[ValidateNever]
[ForeignKey("UpdatedById")]
public Employee? Employee { get; set; }
}
}

View File

@ -0,0 +1,19 @@
using System.ComponentModel.DataAnnotations.Schema;
using Marco.Pms.Model.Employees;
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
namespace Marco.Pms.Model.Directory
{
public class EmployeeBucketMapping
{
public Guid Id { get; set; }
public Guid BucketId { get; set; }
[ValidateNever]
[ForeignKey("BucketId")]
public Bucket? Bucket { get; set; }
public Guid EmployeeId { get; set; }
[ValidateNever]
[ForeignKey("EmployeeId")]
public Employee? Employee { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class AssignBucketDto
{
public Guid EmployeeId { get; set; }
public bool IsActive { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class ContactFilterDto
{
public List<Guid>? BucketIds { get; set; }
public List<Guid>? CategoryIds { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class ContactTagDto
{
public Guid? Id { get; set; }
public string Name { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,8 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class CreateBucketDto
{
public string Name { get; set; } = string.Empty;
public string Description { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,16 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class CreateContactDto
{
public List<Guid>? ProjectIds { get; set; }
public string? Name { get; set; }
public List<CreateContactPhoneDto>? ContactPhones { get; set; }
public List<CreateContactEmailDto>? ContactEmails { get; set; }
public List<Guid>? BucketIds { get; set; }
public Guid? ContactCategoryId { get; set; }
public string? Description { get; set; }
public string? Organization { get; set; }
public string? Address { get; set; }
public List<ContactTagDto>? Tags { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class CreateContactEmailDto
{
public string? Label { get; set; }
public string? EmailAddress { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class CreateContactNoteDto
{
public string Note { get; set; } = string.Empty;
public Guid ContactId { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class CreateContactPhoneDto
{
public string? Label { get; set; }
public string? PhoneNumber { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class UpdateBucketDto
{
public Guid Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
}
}

View File

@ -0,0 +1,17 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class UpdateContactDto
{
public Guid Id { get; set; }
public List<Guid>? ProjectIds { get; set; }
public string? Name { get; set; }
public List<UpdateContactPhoneDto>? ContactPhones { get; set; }
public List<UpdateContactEmailDto>? ContactEmails { get; set; }
public List<Guid>? BucketIds { get; set; }
public Guid ContactCategoryId { get; set; }
public string? Description { get; set; }
public string? Organization { get; set; }
public string? Address { get; set; }
public List<ContactTagDto>? Tags { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class UpdateContactEmailDto
{
public Guid? Id { get; set; }
public string? Label { get; set; }
public string? EmailAddress { get; set; }
public Guid? ContactId { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class UpdateContactNoteDto
{
public Guid Id { get; set; }
public string Note { get; set; } = string.Empty;
public Guid ContactId { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace Marco.Pms.Model.Dtos.Directory
{
public class UpdateContactPhoneDto
{
public Guid? Id { get; set; }
public string? Label { get; set; }
public string? PhoneNumber { get; set; }
public Guid? ContactId { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace Marco.Pms.Model.Dtos.Master
{
public class CreateContactCategoryDto
{
public string? Name { get; set; }
public string? Description { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace Marco.Pms.Model.Dtos.Master
{
public class CreateContactTagDto
{
public string? Name { get; set; }
public string? Description { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace Marco.Pms.Model.Dtos.Master
{
public class UpdateContactCategoryDto
{
public Guid Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace Marco.Pms.Model.Dtos.Master
{
public class UpdateContactTagDto
{
public Guid Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
}
}

View File

@ -8,6 +8,8 @@ namespace Marco.Pms.Model.Dtos.Project
[Required(ErrorMessage = "Project Name is required!")]
[DisplayName("Project Name")]
public string? Name { get; set; }
[DisplayName("Short Name")]
public string? ShortName { get; set; }
[DisplayName("Project Address")]
[Required(ErrorMessage = "Project Address is required!")]

View File

@ -8,4 +8,13 @@
public bool Status { get; set; }
}
public class ProjectsAllocationDto
{
public Guid ProjectId { get; set; }
public Guid JobRoleId { get; set; }
public bool Status { get; set; }
}
}

View File

@ -9,6 +9,8 @@ namespace Marco.Pms.Model.Dtos.Project
[Required(ErrorMessage = "Project Name is required!")]
[DisplayName("Project Name")]
public string? Name { get; set; }
[DisplayName("Short Name")]
public string? ShortName { get; set; }
[DisplayName("Project Address")]
[Required(ErrorMessage = "Project Address is required!")]

View File

@ -9,6 +9,8 @@ namespace Marco.Pms.Model.Dtos.Project
[Required(ErrorMessage = "Project Name is required!")]
[DisplayName("Project Name")]
public string? Name { get; set; }
[DisplayName("Short Name")]
public string? ShortName { get; set; }
[DisplayName("Project Address")]
[Required(ErrorMessage = "Project Address is required!")]

View File

@ -0,0 +1,242 @@
using Marco.Pms.Model.Directory;
using Marco.Pms.Model.Dtos.Directory;
using Marco.Pms.Model.Dtos.Master;
using Marco.Pms.Model.ViewModels.Directory;
using Marco.Pms.Model.ViewModels.Master;
namespace Marco.Pms.Model.Mapper
{
public static class DirectoryMapper
{
public static Contact ToContactFromCreateContactDto(this CreateContactDto createContactDto, Guid tenantId, Guid employeeId)
{
return new Contact
{
Name = createContactDto.Name ?? string.Empty,
ContactCategoryId = createContactDto.ContactCategoryId,
Description = createContactDto.Description ?? string.Empty,
Organization = createContactDto?.Organization ?? string.Empty,
Address = createContactDto != null ? createContactDto.Address : string.Empty,
CreatedById = employeeId,
CreatedAt = DateTime.UtcNow,
TenantId = tenantId
};
}
public static Contact ToContactFromUpdateContactDto(this UpdateContactDto updateContactDto, Guid tenantId, Contact contact)
{
return new Contact
{
Id = updateContactDto.Id,
Name = updateContactDto.Name ?? string.Empty,
ContactCategoryId = updateContactDto.ContactCategoryId,
CreatedAt = contact.CreatedAt,
CreatedById = contact.CreatedById,
Description = updateContactDto.Description ?? string.Empty,
Organization = updateContactDto?.Organization ?? string.Empty,
Address = updateContactDto != null ? updateContactDto.Address : string.Empty,
TenantId = tenantId
};
}
public static ContactVM ToContactVMFromContact(this Contact contact)
{
return new ContactVM
{
Id = contact.Id,
Name = contact.Name,
ContactCategory = contact.ContactCategory != null ? contact.ContactCategory.ToContactCategoryVMFromContactCategoryMaster() : null,
Description = contact.Description ?? string.Empty,
Organization = contact.Organization ?? string.Empty,
Address = contact.Address ?? string.Empty
};
}
public static ContactProfileVM ToContactProfileVMFromContact(this Contact contact)
{
return new ContactProfileVM
{
Id = contact.Id,
Name = contact.Name,
ContactCategory = contact.ContactCategory != null ? contact.ContactCategory.ToContactCategoryVMFromContactCategoryMaster() : null,
Description = contact.Description ?? string.Empty,
Organization = contact.Organization ?? string.Empty,
Address = contact.Address ?? string.Empty,
CreatedAt = contact.CreatedAt,
CreatedBy = contact.CreatedBy != null ? contact.CreatedBy.ToBasicEmployeeVMFromEmployee() : null
};
}
//Contact Phone Mapper
public static ContactPhone ToContactPhoneFromCreateContactPhoneDto(this CreateContactPhoneDto createContactPhoneDto, Guid tenantId, Guid contactId)
{
return new ContactPhone
{
Label = createContactPhoneDto.Label ?? string.Empty,
PhoneNumber = createContactPhoneDto.PhoneNumber ?? string.Empty,
ContactId = contactId,
TenantId = tenantId
};
}
public static ContactPhone ToContactPhoneFromUpdateContactPhoneDto(this UpdateContactPhoneDto updateContactPhoneDto, Guid tenantId, Guid contactId)
{
return new ContactPhone
{
Id = updateContactPhoneDto.Id ?? Guid.Empty,
Label = updateContactPhoneDto.Label ?? string.Empty,
PhoneNumber = updateContactPhoneDto.PhoneNumber ?? string.Empty,
ContactId = contactId,
TenantId = tenantId
};
}
public static ContactPhoneVM ToContactPhoneVMFromContactPhone(this ContactPhone phone)
{
return new ContactPhoneVM
{
Id = phone.Id,
Label = phone.Label ?? string.Empty,
PhoneNumber = phone.PhoneNumber ?? string.Empty,
ContactId = phone.ContactId
};
}
//Contact Email Mapper
public static ContactEmail ToContactEmailFromCreateContactEmailDto(this CreateContactEmailDto createContactEmailDto, Guid tenantId, Guid contactId)
{
return new ContactEmail
{
Label = createContactEmailDto.Label ?? string.Empty,
EmailAddress = createContactEmailDto.EmailAddress ?? string.Empty,
ContactId = contactId,
TenantId = tenantId
};
}
public static ContactEmail ToContactEmailFromUpdateContactEmailDto(this UpdateContactEmailDto updateContactEmailDto, Guid tenantId, Guid contactId)
{
return new ContactEmail
{
Id = updateContactEmailDto.Id ?? Guid.Empty,
Label = updateContactEmailDto.Label ?? string.Empty,
EmailAddress = updateContactEmailDto.EmailAddress ?? string.Empty,
ContactId = contactId,
TenantId = tenantId
};
}
public static ContactEmailVM ToContactEmailVMFromContactEmail(this ContactEmail email)
{
return new ContactEmailVM
{
Id = email.Id,
Label = email.Label ?? string.Empty,
EmailAddress = email.EmailAddress ?? string.Empty,
ContactId = email.ContactId
};
}
//Contact Tag Mapper
public static ContactTagMaster ToContactTagMasterFromCreateContactTagDto(this CreateContactTagDto createContactTagDto, Guid tenantId)
{
return new ContactTagMaster
{
Name = createContactTagDto.Name ?? string.Empty,
Description = createContactTagDto.Description ?? string.Empty,
TenantId = tenantId
};
}
public static ContactTagMaster ToContactTagMasterFromUpdateContactTagDto(this UpdateContactTagDto updateContactTagDto, Guid tenantId)
{
return new ContactTagMaster
{
Id = updateContactTagDto.Id,
Name = updateContactTagDto.Name ?? string.Empty,
Description = updateContactTagDto.Description ?? string.Empty,
TenantId = tenantId
};
}
public static ContactTagVM ToContactTagVMFromContactTagMaster(this ContactTagMaster contactTag)
{
return new ContactTagVM
{
Id = contactTag.Id,
Description = contactTag.Description ?? string.Empty,
Name = contactTag.Name ?? string.Empty,
};
}
//Contact Category Mapper
public static ContactCategoryMaster ToContactCategoryMasterFromCreateContactCategoryDto(this CreateContactCategoryDto createContactTypeDto, Guid tenantId)
{
return new ContactCategoryMaster
{
Name = createContactTypeDto.Name ?? string.Empty,
Description = createContactTypeDto.Description ?? string.Empty,
TenantId = tenantId
};
}
public static ContactCategoryMaster ToContactCategoryMasterFromUpdateContactCategoryDto(this UpdateContactCategoryDto updateContactTypeDto, Guid tenantId)
{
return new ContactCategoryMaster
{
Id = updateContactTypeDto.Id,
Name = updateContactTypeDto.Name ?? string.Empty,
Description = updateContactTypeDto.Description ?? string.Empty,
TenantId = tenantId
};
}
public static ContactCategoryVM ToContactCategoryVMFromContactCategoryMaster(this ContactCategoryMaster contactType)
{
return new ContactCategoryVM
{
Id = contactType.Id,
Name = contactType.Name ?? string.Empty,
Description = contactType.Description ?? string.Empty,
};
}
// Bucket
public static BucketVM ToBucketVMFromBucket(this Bucket bucket)
{
return new BucketVM
{
Id = bucket.Id,
Name = bucket.Name,
Description = bucket.Description,
CreatedBy = bucket.CreatedBy != null ? bucket.CreatedBy.ToBasicEmployeeVMFromEmployee() : null
};
}
public static AssignBucketVM ToAssignBucketVMFromBucket(this Bucket bucket)
{
return new AssignBucketVM
{
Id = bucket.Id,
Name = bucket.Name,
Description = bucket.Description,
CreatedBy = bucket.CreatedBy != null ? bucket.CreatedBy.ToBasicEmployeeVMFromEmployee() : null
};
}
//Contact Note
public static ContactNote ToContactNoteFromCreateContactNoteDto(this CreateContactNoteDto noteDto, Guid tenantId, Guid employeeId)
{
return new ContactNote
{
Note = noteDto.Note,
ContactId = noteDto.ContactId,
CreatedAt = DateTime.UtcNow,
CreatedById = employeeId,
TenantId = tenantId
};
}
public static ContactNoteVM ToContactNoteVMFromContactNote(this ContactNote note)
{
return new ContactNoteVM
{
Id = note.Id,
Note = note.Note,
ContactId = note.ContactId,
CreatedAt = note.CreatedAt,
CreatedBy = note.Createdby != null ? note.Createdby.ToBasicEmployeeVMFromEmployee() : null,
IsActive = note.IsActive
};
}
}
}

View File

@ -14,6 +14,7 @@ namespace Marco.Pms.Model.Mapper
ContactPerson = projectModel.ContactPerson,
ProjectAddress = projectModel.ProjectAddress,
Name = projectModel.Name,
ShortName = projectModel.ShortName,
EndDate = projectModel.EndDate,
StartDate = projectModel.StartDate,
ProjectStatusId = projectModel.ProjectStatusId
@ -27,6 +28,7 @@ namespace Marco.Pms.Model.Mapper
ContactPerson = projectModel.ContactPerson ?? "",
ProjectAddress = projectModel.ProjectAddress ?? "",
Name = projectModel.Name ?? "",
ShortName = projectModel.ShortName,
EndDate = projectModel.EndDate,
StartDate = projectModel.StartDate,
TenantId = TenantId,
@ -42,6 +44,7 @@ namespace Marco.Pms.Model.Mapper
ContactPerson = projectModel.ContactPerson ?? "",
ProjectAddress = projectModel.ProjectAddress ?? "",
Name = projectModel.Name ?? "",
ShortName = projectModel.ShortName,
EndDate = projectModel.EndDate,
StartDate = projectModel.StartDate,
TenantId = TenantId,
@ -61,12 +64,26 @@ namespace Marco.Pms.Model.Mapper
};
}
public static ProjectAllocation ToProjectAllocationFromProjectsAllocationDto(this ProjectsAllocationDto model, Guid TenantId,Guid employeeId)
{
return new ProjectAllocation
{
AllocationDate = DateTime.Now,
EmployeeId = employeeId,
JobRoleId = model.JobRoleId,
TenantId = TenantId,
ProjectId = model.ProjectId
};
}
public static ProjectListVM ToProjectListVMFromProject(this Project project)
{
return new ProjectListVM
{
Id = project.Id,
Name = project.Name,
ShortName = project.ShortName,
ProjectAddress = project.ProjectAddress,
ProjectStatusId = project.ProjectStatusId,
ContactPerson = project.ContactPerson,

View File

@ -14,6 +14,7 @@ namespace Marco.Pms.Model.Projects
[Required]
[DisplayName("Project Name")]
public string? Name { get; set; }
public string? ShortName { get; set; }
[DisplayName("Project Address")]
public string? ProjectAddress { get; set; }

View File

@ -0,0 +1,14 @@
using Marco.Pms.Model.ViewModels.Activities;
namespace Marco.Pms.Model.ViewModels.Directory
{
public class AssignBucketVM
{
public Guid Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
public BasicEmployeeVM? CreatedBy { get; set; }
public List<Guid>? EmployeeIds { get; set; }
public int NumberOfContacts { get; set; }
}
}

View File

@ -0,0 +1,12 @@
using Marco.Pms.Model.ViewModels.Activities;
namespace Marco.Pms.Model.ViewModels.Directory
{
public class BucketVM
{
public Guid Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
public BasicEmployeeVM? CreatedBy { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace Marco.Pms.Model.ViewModels.Directory
{
public class ContactEmailVM
{
public Guid Id { get; set; }
public string? Label { get; set; }
public string? EmailAddress { get; set; }
public Guid ContactId { get; set; }
}
}

View File

@ -0,0 +1,16 @@
using Marco.Pms.Model.ViewModels.Activities;
namespace Marco.Pms.Model.ViewModels.Directory
{
public class ContactNoteVM
{
public Guid Id { get; set; }
public string Note { get; set; } = string.Empty;
public DateTime CreatedAt { get; set; }
public BasicEmployeeVM? CreatedBy { get; set; }
public DateTime? UpdatedAt { get; set; }
public BasicEmployeeVM? UpdatedBy { get; set; }
public Guid ContactId { get; set; }
public bool IsActive { get; set; }
}
}

View File

@ -0,0 +1,10 @@
namespace Marco.Pms.Model.ViewModels.Directory
{
public class ContactPhoneVM
{
public Guid Id { get; set; }
public string? Label { get; set; }
public string? PhoneNumber { get; set; }
public Guid ContactId { get; set; }
}
}

View File

@ -0,0 +1,26 @@
using Marco.Pms.Model.ViewModels.Activities;
using Marco.Pms.Model.ViewModels.Master;
using Marco.Pms.Model.ViewModels.Projects;
namespace Marco.Pms.Model.ViewModels.Directory
{
public class ContactProfileVM
{
public Guid Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
public string? Organization { get; set; }
public string? Address { get; set; }
public DateTime CreatedAt { get; set; }
public BasicEmployeeVM? CreatedBy { get; set; }
public DateTime? UpdatedAt { get; set; }
public BasicEmployeeVM? UpdatedBy { get; set; }
public List<ContactPhoneVM> ContactPhones { get; set; } = new List<ContactPhoneVM>();
public List<ContactEmailVM> ContactEmails { get; set; } = new List<ContactEmailVM>();
public ContactCategoryVM? ContactCategory { get; set; }
public List<BasicProjectVM> Projects { get; set; } = new List<BasicProjectVM>();
public List<BucketVM> Buckets { get; set; } = new List<BucketVM>();
public List<ContactTagVM> Tags { get; set; } = new List<ContactTagVM>();
public List<ContactNoteVM> Notes { get; set; } = new List<ContactNoteVM>();
}
}

View File

@ -0,0 +1,19 @@
using Marco.Pms.Model.ViewModels.Master;
namespace Marco.Pms.Model.ViewModels.Directory
{
public class ContactVM
{
public Guid Id { get; set; }
public List<Guid>? ProjectIds { get; set; }
public string? Name { get; set; }
public List<ContactPhoneVM>? ContactPhones { get; set; }
public List<ContactEmailVM>? ContactEmails { get; set; }
public ContactCategoryVM? ContactCategory { get; set; }
public List<Guid>? BucketIds { get; set; }
public string? Description { get; set; }
public string? Organization { get; set; }
public string? Address { get; set; }
public List<ContactTagVM>? Tags { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace Marco.Pms.Model.ViewModels.Master
{
public class ContactCategoryVM
{
public Guid Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
}
}

View File

@ -0,0 +1,9 @@
namespace Marco.Pms.Model.ViewModels.Master
{
public class ContactTagVM
{
public Guid Id { get; set; }
public string? Name { get; set; }
public string? Description { get; set; }
}
}

View File

@ -0,0 +1,8 @@
namespace Marco.Pms.Model.ViewModels.Projects
{
public class BasicProjectVM
{
public Guid Id { get; set; }
public string? Name { get; set; }
}
}

View File

@ -4,6 +4,7 @@
{
public Guid Id { get; set; }
public string? Name { get; set; }
public string? ShortName { get; set; }
public string? ProjectAddress { get; set; }
public string? ContactPerson { get; set; }

View File

@ -150,12 +150,12 @@ namespace MarcoBMS.Services.Controllers
if (dateFrom != null && DateTime.TryParse(dateFrom, out fromDate) == false)
{
_logger.LogError("User sent Invalid from Date while featching attendance logs");
_logger.LogError("User sent Invalid fromDate while featching attendance logs");
return BadRequest(ApiResponse<object>.ErrorResponse("Invalid Date", "Invalid Date", 400));
}
if (dateTo != null && DateTime.TryParse(dateTo, out toDate) == false)
{
_logger.LogError("User sent Invalid to Date while featching attendance logs");
_logger.LogError("User sent Invalid toDate while featching attendance logs");
return BadRequest(ApiResponse<object>.ErrorResponse("Invalid Date", "Invalid Date", 400));
}

View File

@ -0,0 +1,341 @@
using Marco.Pms.Model.Dtos.Directory;
using Marco.Pms.Model.Utilities;
using Marco.Pms.Services.Helpers;
using MarcoBMS.Services.Service;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
namespace Marco.Pms.Services.Controllers
{
[ApiController]
[Route("api/[controller]")]
[Authorize]
public class DirectoryController : ControllerBase
{
private readonly DirectoryHelper _directoryHelper;
private readonly ILoggingService _logger;
public DirectoryController(DirectoryHelper directoryHelper, ILoggingService logger)
{
_directoryHelper = directoryHelper;
_logger = logger;
}
[HttpGet]
public async Task<IActionResult> GetContactList([FromQuery] string? search, [FromQuery] List<Guid>? bucketIds, [FromQuery] List<Guid>? categoryIds, [FromQuery] Guid? projectId, [FromQuery] bool active = true)
{
ContactFilterDto filterDto = new ContactFilterDto
{
BucketIds = bucketIds,
CategoryIds = categoryIds
};
var response = await _directoryHelper.GetListOfContacts(search, active, filterDto, projectId);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 401)
{
return Unauthorized(response);
}
else
{
return BadRequest(response);
}
}
[HttpGet("contact-bucket/{bucketId}")]
public async Task<IActionResult> GetContactsListByBucketId(Guid bucketId)
{
var response = await _directoryHelper.GetContactsListByBucketId(bucketId);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 401)
{
return Unauthorized(response);
}
else
{
return BadRequest(response);
}
}
[HttpPost]
public async Task<IActionResult> CreateContact([FromBody] CreateContactDto createContact)
{
if (!ModelState.IsValid)
{
var errors = ModelState.Values
.SelectMany(v => v.Errors)
.Select(e => e.ErrorMessage)
.ToList();
_logger.LogError("User sent Invalid Date while marking attendance");
return BadRequest(ApiResponse<object>.ErrorResponse("Invalid data", errors, 400));
}
var response = await _directoryHelper.CreateContact(createContact);
if (response.StatusCode == 200)
{
return Ok(response);
}
else
{
return BadRequest(response);
}
}
[HttpPut("{id}")]
public async Task<IActionResult> UpdateContact(Guid id, [FromBody] UpdateContactDto updateContact)
{
var response = await _directoryHelper.UpdateContact(id, updateContact);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else if (response.StatusCode == 401)
{
return Unauthorized(response);
}
else
{
return BadRequest(response);
}
}
[HttpGet("profile/{id}")]
public async Task<IActionResult> GetContactProfile(Guid id)
{
var response = await _directoryHelper.GetContactProfile(id);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else
{
return BadRequest(response);
}
}
[HttpGet("organization")]
public async Task<IActionResult> GetOrganizationList()
{
var response = await _directoryHelper.GetOrganizationList();
return Ok(response);
}
[HttpDelete("{id}")]
public async Task<IActionResult> DeleteContact(Guid id, [FromQuery] bool? active)
{
var response = await _directoryHelper.DeleteContact(id, active ?? false);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else
{
return BadRequest(response);
}
}
// -------------------------------- Contact Notes --------------------------------
[HttpPost("note")]
public async Task<IActionResult> CreateContactNote([FromBody] CreateContactNoteDto noteDto)
{
var response = await _directoryHelper.CreateContactNote(noteDto);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else
{
return BadRequest(response);
}
}
[HttpGet("notes/{ContactId}")]
public async Task<IActionResult> GetNoteListByContactId(Guid contactId, [FromQuery] bool active = true)
{
var response = await _directoryHelper.GetNoteListByContactId(contactId, active);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else
{
return BadRequest(response);
}
}
[HttpPut("note/{id}")]
public async Task<IActionResult> UpdateContactNote(Guid id, [FromBody] UpdateContactNoteDto noteDto)
{
var response = await _directoryHelper.UpdateContactNote(id, noteDto);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else
{
return BadRequest(response);
}
}
[HttpDelete("note/{id}")]
public async Task<IActionResult> DeleteContactNote(Guid id, [FromQuery] bool? active)
{
var response = await _directoryHelper.DeleteContactNote(id, active ?? false);
return Ok(response);
}
// -------------------------------- Bucket --------------------------------
[HttpGet("buckets")]
public async Task<IActionResult> GetBucketList()
{
var response = await _directoryHelper.GetBucketList();
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 401)
{
return Unauthorized(response);
}
else
{
return BadRequest(response);
}
}
[HttpPost("bucket")]
public async Task<IActionResult> CreateBucket(CreateBucketDto bucketDto)
{
if (!ModelState.IsValid)
{
var errors = ModelState.Values
.SelectMany(v => v.Errors)
.Select(e => e.ErrorMessage)
.ToList();
_logger.LogError("User sent Invalid Date while marking attendance");
return BadRequest(ApiResponse<object>.ErrorResponse("Invalid data", errors, 400));
}
var response = await _directoryHelper.CreateBucket(bucketDto);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 409)
{
return Conflict(response);
}
else if (response.StatusCode == 401)
{
return Unauthorized(response);
}
else
{
return BadRequest(response);
}
}
[HttpPut("bucket/{id}")]
public async Task<IActionResult> UpdateBucket(Guid id, [FromBody] UpdateBucketDto bucketDto)
{
var response = await _directoryHelper.UpdateBucket(id, bucketDto);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else if (response.StatusCode == 401)
{
return Unauthorized(response);
}
else
{
return BadRequest(response);
}
}
[HttpPost("assign-bucket/{bucketId}")]
public async Task<IActionResult> AssignBucket(Guid bucketId, [FromBody] List<AssignBucketDto> assignBuckets)
{
var response = await _directoryHelper.AssignBucket(bucketId, assignBuckets);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else if (response.StatusCode == 401)
{
return Unauthorized(response);
}
else
{
return BadRequest(response);
}
}
[HttpDelete("bucket/{id}")]
public async Task<IActionResult> DeleteBucket(Guid id)
{
var response = await _directoryHelper.DeleteBucket(id);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else if (response.StatusCode == 401)
{
return Unauthorized(response);
}
else
{
return BadRequest(response);
}
}
}
}

View File

@ -9,6 +9,7 @@ using Marco.Pms.Model.Utilities;
using Marco.Pms.Model.ViewModels.Activities;
using Marco.Pms.Model.ViewModels.Forum;
using Marco.Pms.Model.ViewModels.Master;
using Marco.Pms.Services.Helpers;
using MarcoBMS.Services.Helpers;
using MarcoBMS.Services.Service;
using Microsoft.AspNetCore.Authorization;
@ -25,11 +26,13 @@ namespace Marco.Pms.Services.Controllers
private readonly ApplicationDbContext _context;
private readonly UserHelper _userHelper;
private readonly ILoggingService _logger;
public MasterController(ApplicationDbContext context, UserHelper userHelper, ILoggingService logger)
private readonly MasterHelper _masterHelper;
public MasterController(ApplicationDbContext context, UserHelper userHelper, ILoggingService logger, MasterHelper masterHelper)
{
_context = context;
_userHelper = userHelper;
_logger = logger;
_masterHelper = masterHelper;
}
// -------------------------------- Activity --------------------------------
@ -667,5 +670,142 @@ namespace Marco.Pms.Services.Controllers
return NotFound(ApiResponse<object>.ErrorResponse("Work category not found", "Work category not found", 404));
}
}
// -------------------------------- Contact Category --------------------------------
[HttpGet("contact-categories")]
public async Task<IActionResult> GetContactCategoryMasterList()
{
var response = await _masterHelper.GetContactCategoriesList();
return Ok(response);
}
[HttpGet("contact-category/{id}")]
public async Task<IActionResult> GetContactCategoryMaster(Guid id)
{
var response = await _masterHelper.GetContactCategoryById(id);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else
{
return BadRequest(response);
}
}
[HttpPost("contact-category")]
public async Task<IActionResult> CreateContactCategoryMaster([FromBody] CreateContactCategoryDto contactCategoryDto)
{
var response = await _masterHelper.CreateContactCategory(contactCategoryDto);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 409)
{
return Conflict(response);
}
else
{
return BadRequest(response);
}
}
[HttpPost("contact-category/edit/{id}")]
public async Task<IActionResult> UpdateContactCategoryMaster(Guid id, [FromBody] UpdateContactCategoryDto updateContactCategoryDto)
{
var response = await _masterHelper.UpdateContactCategory(id, updateContactCategoryDto);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else
{
return BadRequest(response);
}
}
[HttpDelete("contact-category/{id}")]
public async Task<IActionResult> DeletecontactCategoryMaster(Guid id)
{
var response = await _masterHelper.DeleteContactCategory(id);
return Ok(response);
}
// -------------------------------- Contact Tag --------------------------------
[HttpGet("contact-tags")]
public async Task<IActionResult> GetContactTagMasterList()
{
var response = await _masterHelper.GetContactTags();
return Ok(response);
}
[HttpGet("contact-tag/{id}")]
public async Task<IActionResult> GetContactTagMaster(Guid id)
{
return Ok();
}
[HttpPost("contact-tag")]
public async Task<IActionResult> CreateContactTagMaster([FromBody] CreateContactTagDto contactTagDto)
{
if (!ModelState.IsValid)
{
var errors = ModelState.Values
.SelectMany(v => v.Errors)
.Select(e => e.ErrorMessage)
.ToList();
_logger.LogError("User sent Invalid Date while marking attendance");
return BadRequest(ApiResponse<object>.ErrorResponse("Invalid data", errors, 400));
}
var response = await _masterHelper.CreateContactTag(contactTagDto);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 409)
{
return Conflict(response);
}
else
{
return BadRequest(response);
}
}
[HttpPost("contact-tag/edit/{id}")]
public async Task<IActionResult> UpdateContactTagMaster(Guid id, [FromBody] UpdateContactTagDto updateContactTagDto)
{
var response = await _masterHelper.UpdateContactTag(id, updateContactTagDto);
if (response.StatusCode == 200)
{
return Ok(response);
}
else if (response.StatusCode == 404)
{
return NotFound(response);
}
else
{
return BadRequest(response);
}
}
[HttpDelete("contact-tag/{id}")]
public async Task<IActionResult> DeletecontactTagMaster(Guid id)
{
var response = await _masterHelper.DeleteContactTag(id);
return Ok(response);
}
}
}

View File

@ -13,6 +13,7 @@ using MarcoBMS.Services.Service;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
namespace MarcoBMS.Services.Controllers
{
@ -150,6 +151,7 @@ namespace MarcoBMS.Services.Controllers
{
projectVM.Id = vm.project.Id;
projectVM.Name = vm.project.Name;
projectVM.ShortName = vm.project.ShortName;
projectVM.ProjectAddress = vm.project.ProjectAddress;
projectVM.ContactPerson = vm.project.ContactPerson;
projectVM.StartDate = vm.project.StartDate;
@ -682,5 +684,122 @@ namespace MarcoBMS.Services.Controllers
}
[HttpGet("assigned-projects/{employeeId}")]
public async Task<IActionResult> GetProjectsByEmployee([FromRoute] Guid employeeId)
{
Guid tenantId = _userHelper.GetTenantId();
if (employeeId == Guid.Empty)
{
return BadRequest(ApiResponse<object>.ErrorResponse("Invalid details.", "Employee id not valid.", 400));
}
List<Guid> projectList = await _context.ProjectAllocations
.Where(c => c.TenantId == tenantId && c.EmployeeId == employeeId && c.IsActive)
.Select(c => c.ProjectId).Distinct()
.ToListAsync();
if (!projectList.Any())
{
return NotFound(ApiResponse<object>.SuccessResponse(new List<object>(), "No projects found.",200));
}
List<Project> projectlist = await _context.Projects
.Where(p => projectList.Contains(p.Id))
.ToListAsync();
List<ProjectListVM> projects = new List<ProjectListVM>();
foreach (var project in projectlist) {
projects.Add(project.ToProjectListVMFromProject());
}
return Ok(ApiResponse<object>.SuccessResponse(projects, "Success.", 200));
}
[HttpPost("assign-projects/{employeeId}")]
public async Task<ActionResult> AssigneProjectsToEmployee([FromBody] List<ProjectsAllocationDto> projectAllocationDtos, [FromRoute] Guid employeeId)
{
if(projectAllocationDtos != null && employeeId != Guid.Empty)
{
Guid TenentID = GetTenantId();
List<object>? result = new List<object>();
foreach(var projectAllocationDto in projectAllocationDtos)
{
try
{
ProjectAllocation projectAllocation = projectAllocationDto.ToProjectAllocationFromProjectsAllocationDto(TenentID,employeeId);
ProjectAllocation? projectAllocationFromDb = await _context.ProjectAllocations.Where(c => c.EmployeeId == employeeId && c.ProjectId == projectAllocationDto.ProjectId && c.ReAllocationDate == null && c.TenantId == TenentID).SingleOrDefaultAsync();
if(projectAllocationFromDb != null)
{
_context.ProjectAllocations.Attach(projectAllocationFromDb);
if (projectAllocationDto.Status)
{
projectAllocationFromDb.JobRoleId = projectAllocation.JobRoleId; ;
projectAllocationFromDb.IsActive = true;
_context.Entry(projectAllocationFromDb).Property(e => e.JobRoleId).IsModified = true;
_context.Entry(projectAllocationFromDb).Property(e => e.IsActive).IsModified = true;
}
else
{
projectAllocationFromDb.ReAllocationDate = DateTime.UtcNow;
projectAllocationFromDb.IsActive = false;
_context.Entry(projectAllocationFromDb).Property(e => e.ReAllocationDate).IsModified = true;
_context.Entry(projectAllocationFromDb).Property(e => e.IsActive).IsModified = true;
}
await _context.SaveChangesAsync();
var result1 = new
{
Id = projectAllocationFromDb.Id,
EmployeeId = projectAllocation.EmployeeId,
JobRoleId = projectAllocation.JobRoleId,
IsActive = projectAllocation.IsActive,
ProjectId = projectAllocation.ProjectId,
AllocationDate = projectAllocation.AllocationDate,
ReAllocationDate = projectAllocation.ReAllocationDate,
TenantId = projectAllocation.TenantId
};
result.Add(result1);
}
else
{
projectAllocation.AllocationDate = DateTime.Now;
projectAllocation.IsActive = true;
_context.ProjectAllocations.Add(projectAllocation);
await _context.SaveChangesAsync();
}
}
catch (Exception ex) {
return Ok(ApiResponse<object>.ErrorResponse(ex.Message, ex, 400));
}
}
return Ok(ApiResponse<object>.SuccessResponse(result, "Data saved successfully", 200));
}
else
{
return BadRequest(ApiResponse<object>.ErrorResponse("Invalid details.", "All Field is required", 400));
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,251 @@
using Marco.Pms.DataAccess.Data;
using Marco.Pms.Model.Directory;
using Marco.Pms.Model.Dtos.Master;
using Marco.Pms.Model.Employees;
using Marco.Pms.Model.Mapper;
using Marco.Pms.Model.Utilities;
using Marco.Pms.Model.ViewModels.Master;
using MarcoBMS.Services.Helpers;
using MarcoBMS.Services.Service;
using Microsoft.EntityFrameworkCore;
namespace Marco.Pms.Services.Helpers
{
public class MasterHelper
{
private readonly ApplicationDbContext _context;
private readonly ILoggingService _logger;
private readonly UserHelper _userHelper;
public MasterHelper(ApplicationDbContext context, ILoggingService logger, UserHelper userHelper)
{
_context = context;
_logger = logger;
_userHelper = userHelper;
}
// -------------------------------- Contact Category --------------------------------
public async Task<ApiResponse<object>> CreateContactCategory(CreateContactCategoryDto contactCategoryDto)
{
Guid tenantId = _userHelper.GetTenantId();
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
if (contactCategoryDto != null)
{
ContactCategoryMaster? existingContactCategory = await _context.ContactCategoryMasters.FirstOrDefaultAsync(c => c.TenantId == tenantId && c.Name.ToLower() == (contactCategoryDto.Name != null ? contactCategoryDto.Name.ToLower() : ""));
if (existingContactCategory == null)
{
ContactCategoryMaster contactCategory = contactCategoryDto.ToContactCategoryMasterFromCreateContactCategoryDto(tenantId);
_context.ContactCategoryMasters.Add(contactCategory);
await _context.SaveChangesAsync();
ContactCategoryVM categoryVM = contactCategory.ToContactCategoryVMFromContactCategoryMaster();
_logger.LogInfo("Employee ID {LoggedInEmployeeId} created a contact category {ContactCategoryId}.", LoggedInEmployee.Id, contactCategory.Id);
return ApiResponse<object>.SuccessResponse(categoryVM, "Category Created Successfully", 200);
}
_logger.LogWarning("Employee ID {LoggedInEmployeeId} attempted to create an existing contact category.", LoggedInEmployee.Id);
return ApiResponse<object>.ErrorResponse("Category already existed", "Category already existed", 409);
}
_logger.LogWarning("Employee with ID {LoggedInEmployeeId} sended empty payload", LoggedInEmployee.Id);
return ApiResponse<object>.ErrorResponse("User Send empty Payload", "User Send empty Payload", 400);
}
public async Task<ApiResponse<object>> UpdateContactCategory(Guid id, UpdateContactCategoryDto contactCategoryDto)
{
Guid tenantId = _userHelper.GetTenantId();
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
if (contactCategoryDto != null && id == contactCategoryDto.Id)
{
ContactCategoryMaster? contactCategory = await _context.ContactCategoryMasters.FirstOrDefaultAsync(c => c.TenantId == tenantId && c.Id == id);
if (contactCategory != null)
{
contactCategory.Name = contactCategoryDto.Name ?? "";
contactCategory.Description = contactCategoryDto.Description ?? "";
_context.DirectoryUpdateLogs.Add(new DirectoryUpdateLog
{
RefereanceId = contactCategory.Id,
UpdatedById = LoggedInEmployee.Id,
UpdateAt = DateTime.UtcNow
});
await _context.SaveChangesAsync();
ContactCategoryVM categoryVM = contactCategory.ToContactCategoryVMFromContactCategoryMaster();
_logger.LogInfo("Employee ID {LoggedInEmployeeId} created a contact category {ContactCategoryId}.", LoggedInEmployee.Id, contactCategory.Id);
return ApiResponse<object>.SuccessResponse(categoryVM, "Category Created Successfully", 200);
}
_logger.LogWarning("Employee ID {LoggedInEmployeeId} attempted to update a contact category but not found in database.", LoggedInEmployee.Id);
return ApiResponse<object>.ErrorResponse("Category not found", "Category not found", 404);
}
_logger.LogWarning("Employee with ID {LoggedInEmployeeId} sended empty payload", LoggedInEmployee.Id);
return ApiResponse<object>.ErrorResponse("User Send empty Payload", "User Send empty Payload", 400);
}
public async Task<ApiResponse<object>> GetContactCategoriesList()
{
Guid tenantId = _userHelper.GetTenantId();
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
var categoryList = await _context.ContactCategoryMasters.Where(c => c.TenantId == tenantId).ToListAsync();
List<ContactCategoryVM> contactCategories = new List<ContactCategoryVM>();
foreach (var category in categoryList)
{
ContactCategoryVM categoryVM = category.ToContactCategoryVMFromContactCategoryMaster();
contactCategories.Add(categoryVM);
}
_logger.LogInfo("{count} contact categoires are fetched by Employee with ID {LoggedInEmployeeId}", contactCategories.Count, LoggedInEmployee.Id);
return ApiResponse<object>.SuccessResponse(contactCategories, System.String.Format("{0} contact categories fetched successfully", contactCategories.Count), 200);
}
public async Task<ApiResponse<object>> GetContactCategoryById(Guid id)
{
Guid tenantId = _userHelper.GetTenantId();
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
var category = await _context.ContactCategoryMasters.FirstOrDefaultAsync(c => c.Id == id && c.TenantId == tenantId);
if (category != null)
{
ContactCategoryVM categoryVM = category.ToContactCategoryVMFromContactCategoryMaster();
_logger.LogInfo("Employee {EmployeeId} fetched contact category {ContactCategoryID}", LoggedInEmployee.Id, category.Id);
return ApiResponse<object>.SuccessResponse(categoryVM, "Category fetched successfully", 200);
}
_logger.LogWarning("Employee {EmployeeId} attempted to fetch contact category {ContactCategoryID} but not found in database", LoggedInEmployee.Id, id);
return ApiResponse<object>.ErrorResponse("Category not found", "Category not found", 404);
}
public async Task<ApiResponse<object>> DeleteContactCategory(Guid id)
{
Guid tenantId = _userHelper.GetTenantId();
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
ContactCategoryMaster? contactCategory = await _context.ContactCategoryMasters.FirstOrDefaultAsync(c => c.Id == id && c.TenantId == tenantId);
if (contactCategory != null)
{
List<Contact>? existingContacts = await _context.Contacts.AsNoTracking().Where(c => c.ContactCategoryId == contactCategory.Id).ToListAsync();
if (existingContacts.Count > 0)
{
List<Contact>? contacts = new List<Contact>();
foreach (var contact in existingContacts)
{
contact.ContactCategoryId = null;
contacts.Add(contact);
}
_context.Contacts.UpdateRange(contacts);
}
_context.ContactCategoryMasters.Remove(contactCategory);
_context.DirectoryUpdateLogs.Add(new DirectoryUpdateLog
{
RefereanceId = id,
UpdatedById = LoggedInEmployee.Id,
UpdateAt = DateTime.UtcNow
});
await _context.SaveChangesAsync();
_logger.LogInfo("Employee {EmployeeId} deleted contact category {ContactCategoryId}", LoggedInEmployee.Id, id);
}
_logger.LogWarning("Employee {EmployeeId} tries to delete Category {CategoryId} but not found in database", LoggedInEmployee.Id, id);
return ApiResponse<object>.SuccessResponse(new { }, "Category deleted successfully", 200);
}
// -------------------------------- Contact Tag --------------------------------
public async Task<ApiResponse<Object>> GetContactTags()
{
Guid tenantId = _userHelper.GetTenantId();
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
var taglist = await _context.ContactTagMasters.Where(t => t.TenantId == tenantId).ToListAsync();
List<ContactTagVM> contactTags = new List<ContactTagVM>();
foreach (var tag in taglist)
{
ContactTagVM tagVm = tag.ToContactTagVMFromContactTagMaster();
contactTags.Add(tagVm);
}
_logger.LogInfo("{count} contact Tags are fetched by Employee with ID {LoggedInEmployeeId}", contactTags.Count, LoggedInEmployee.Id);
return ApiResponse<object>.SuccessResponse(contactTags, System.String.Format("{0} contact tags fetched successfully", contactTags.Count), 200);
}
public async Task<ApiResponse<object>> CreateContactTag(CreateContactTagDto contactTagDto)
{
Guid tenantId = _userHelper.GetTenantId();
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
if (contactTagDto != null)
{
ContactTagMaster? existingContactTag = await _context.ContactTagMasters.FirstOrDefaultAsync(c => c.TenantId == tenantId && c.Name.ToLower() == (contactTagDto.Name != null ? contactTagDto.Name.ToLower() : ""));
if (existingContactTag == null)
{
ContactTagMaster contactTag = contactTagDto.ToContactTagMasterFromCreateContactTagDto(tenantId);
_context.ContactTagMasters.Add(contactTag);
await _context.SaveChangesAsync();
ContactTagVM tagVM = contactTag.ToContactTagVMFromContactTagMaster();
_logger.LogInfo("Employee ID {LoggedInEmployeeId} created a contact tag {ContactTagId}.", LoggedInEmployee.Id, contactTag.Id);
return ApiResponse<object>.SuccessResponse(tagVM, "Tag Created Successfully", 200);
}
_logger.LogWarning("Employee ID {LoggedInEmployeeId} attempted to create an existing contact tag.", LoggedInEmployee.Id);
return ApiResponse<object>.ErrorResponse("Tag already existed", "Tag already existed", 409);
}
_logger.LogWarning("Employee with ID {LoggedInEmployeeId} sended empty payload", LoggedInEmployee.Id);
return ApiResponse<object>.ErrorResponse("User Send empty Payload", "User Send empty Payload", 400);
}
public async Task<ApiResponse<object>> UpdateContactTag(Guid id, UpdateContactTagDto contactTagDto)
{
var tenantId = _userHelper.GetTenantId();
Employee LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
if (contactTagDto != null && contactTagDto.Id == id)
{
ContactTagMaster? contactTag = await _context.ContactTagMasters.AsNoTracking().FirstOrDefaultAsync(t => t.TenantId == tenantId && t.Id == contactTagDto.Id);
if (contactTag != null)
{
contactTag = contactTagDto.ToContactTagMasterFromUpdateContactTagDto(tenantId);
_context.ContactTagMasters.Update(contactTag);
_context.DirectoryUpdateLogs.Add(new DirectoryUpdateLog
{
RefereanceId = contactTag.Id,
UpdatedById = LoggedInEmployee.Id,
UpdateAt = DateTime.UtcNow
});
await _context.SaveChangesAsync();
ContactTagVM contactTagVm = contactTag.ToContactTagVMFromContactTagMaster();
_logger.LogInfo("Work category master {ConatctTagId} updated successfully by employee {EmployeeId}", contactTagVm.Id, LoggedInEmployee.Id);
ApiResponse<object>.SuccessResponse(contactTagVm, "Contact Tag master updated successfully", 200);
}
_logger.LogError("Contact Tag master {ContactTagId} not found in database", id);
ApiResponse<object>.ErrorResponse("Contact Tag master not found", "Contact tag master not found", 404);
}
_logger.LogWarning("Employee with ID {LoggedInEmployeeId} sended empty payload", LoggedInEmployee.Id);
return ApiResponse<object>.ErrorResponse("User Send empty Payload", "User Send empty Payload", 400);
}
public async Task<ApiResponse<object>> DeleteContactTag(Guid id)
{
Guid tenantId = _userHelper.GetTenantId();
var LoggedInEmployee = await _userHelper.GetCurrentEmployeeAsync();
ContactTagMaster? contactTag = await _context.ContactTagMasters.FirstOrDefaultAsync(c => c.Id == id && c.TenantId == tenantId);
if (contactTag != null)
{
List<ContactTagMapping>? tagMappings = await _context.ContactTagMappings.Where(t => t.ContactTagId == contactTag.Id).ToListAsync();
_context.ContactTagMasters.Remove(contactTag);
if (tagMappings.Any())
{
_context.ContactTagMappings.RemoveRange(tagMappings);
}
_context.DirectoryUpdateLogs.Add(new DirectoryUpdateLog
{
RefereanceId = id,
UpdatedById = LoggedInEmployee.Id,
UpdateAt = DateTime.UtcNow
});
await _context.SaveChangesAsync();
_logger.LogInfo("Employee {EmployeeId} deleted contact tag {ContactTagId}", LoggedInEmployee.Id, id);
}
_logger.LogWarning("Employee {EmployeeId} tries to delete Tag {ContactTagId} but not found in database", LoggedInEmployee.Id, id);
return ApiResponse<object>.SuccessResponse(new { }, "Tag deleted successfully", 200);
}
}
}

View File

@ -3,6 +3,7 @@ using Marco.Pms.DataAccess.Data;
using Marco.Pms.Model.Authentication;
using Marco.Pms.Model.Entitlements;
using Marco.Pms.Model.Utilities;
using Marco.Pms.Services.Helpers;
using Marco.Pms.Services.Service;
using MarcoBMS.Services.Helpers;
using MarcoBMS.Services.Middleware;
@ -131,6 +132,8 @@ builder.Services.AddScoped<UserHelper>();
builder.Services.AddScoped<RolesHelper>();
builder.Services.AddScoped<EmployeeHelper>();
builder.Services.AddScoped<ProjectsHelper>();
builder.Services.AddScoped<DirectoryHelper>();
builder.Services.AddScoped<MasterHelper>();
builder.Services.AddSingleton<ILoggingService, LoggingService>();

View File

@ -9,7 +9,7 @@
"Title": "Dev"
},
"ConnectionStrings": {
"DefaultConnectionString": "Server=147.93.98.152;User ID=devuser;Password=AppUser@123$;Database=MarcoBMS10"
"DefaultConnectionString": "Server=147.93.98.152;User ID=devuser;Password=AppUser@123$;Database=MarcoBMSGuid"
},
"SmtpSettings": {
"SmtpServer": "smtp.gmail.com",