diff --git a/CHANGELOG.md b/CHANGELOG.md index 280f85e..b752529 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,7 @@ All notable changes to this project will be documented in this file. - Migration - Update deps - Add database relation for notification group +- Update changelog format for breaking change ### Experimental @@ -261,27 +262,6 @@ All notable changes to this project will be documented in this file. ### 🚀 Features -- Add flag -- Add permision check -- Filter view by role -- User permission on delete -- Permission control -- Query also search for passport number -- Add branch bank qr -- Return relation -- Multiple profile imagea -- Count stats -- Also remove file when delete data -- Customer branch permission -- Control list view by role -- Scope view by role -- Double check permission customer branch -- Employee permission check -- Permission check employee -- Remove some roles from manage some endpoints -- Scope stats -- Re-add head of sale to be able to manage endpoints -- Add delete image endpoint - Customer permission - Product group permission - Allow sale to manage self branch @@ -311,29 +291,6 @@ All notable changes to this project will be documented in this file. ### 🐛 Bug Fixes -- Type -- Count by group -- Change role name -- Error updatedAt -- Cannot set role as expected -- Permission failed -- Stats not take scope into account -- Fix no perm -- Error missing var -- Error -- Protect endpoints -- Wrong condition check -- Missing auth -- Missing field input -- Path -- Only return file name -- Backward compat -- Relation -- User in branch not see hq -- Wrong condition -- Condition -- Role missing on edit -- Head branch not listed - User permission control - Stats not accurate due to prev commit - Customer edit not consider related branch perm @@ -350,6 +307,7 @@ All notable changes to this project will be documented in this file. - Conflict endpoints - Tag - Wrong payload +- Relation - Customer code should not have company code - Update payload - Typo and handle delete @@ -361,29 +319,6 @@ All notable changes to this project will be documented in this file. ### 🚜 Refactor -- Use kysely query builder instead -- Roles -- Permission -- 💥**breaking**💥 Remove product type -- 💥**breaking**💥 Remove unnecessary endpoint -- Permission user -- View condition and permission -- Small adjustment -- Remove unused role -- Adjust function -- Scope view -- Update role -- Move file out -- Separate function -- Change file name -- Move file -- Organize file -- Drop supported presigned url return -- Branch bank delete handle -- Update file path -- Add selectedImage for profile shown -- Structure -- Fix permission for sure - Use factory function for perm check - Only query if have - 💥**breaking**💥 Remove deprecated @@ -412,8 +347,6 @@ All notable changes to this project will be documented in this file. ### ⚙️ Miscellaneous Tasks -- Format -- Update migration - Remove unused - Add migration - Add helper function @@ -427,549 +360,6 @@ All notable changes to this project will be documented in this file. - Update endpoints tag - Update tag - Database refactor - -## [0.2.1] - 2024-08-30 - -### 🚀 Features - -- Insert province district sub-district into db -- Add headoffice as relation - -### 🐛 Bug Fixes - -- Wrong endpoint -- Build error -- Branch manager cannot create user -- Wrong permission check -- Branch manager must not increase your own role -- Wrong condition -- Wrong field extract - -### 🚜 Refactor - -- Also return employee count of customer - -### Change - -- Make user can view only user within branch - -## [0.2.0] - 2024-08-29 - -### 🚀 Features - -- Bump deps version -- Add user relation on query -- Add count gender by query -- Include relation -- Permmission branch -- Add product code -- Remove scoped branch (change soon) -- Product related permission -- Customer permission role -- Add more role to each endpoint -- Add user and assign to branch at the same time -- Add product type to service -- Add count of service under group / type -- Query service by product type -- Add more role to endpoints -- Protect endpoints with role -- Scope permission in separated customer branch endpoint -- Add query string -- Order relation -- Add relation to employee -- Add count branch -- Change format -- Add user real name to log -- Add query param to include full detail in service -- Add quotation structure -- Add get quotation by id endpoint -- Add quotation list endpoint (no query) -- Structure input before insert to database -- Create quotation endpoint (test required) -- Add quotation endpoint (complete) -- Exclude some work from service -- Add original service reference -- Delete quotation endpoints -- Update quotation -- Generate quotation code -- Image endpoint get or upload -- Image endpoint (branch endpoint) -- Add bank to branch payload (optional) -- Add bank field -- New gen branch code -- Change code gen of user -- Check code constraints -- 💥**breaking**💥 Code gen customer -- Now system do not show system role -- Add endpoint for get branch admin -- Add field middleName and name prefix (optional) -- Add status filter -- Service code now accept any string -- Filter by customerId -- Update code generator -- Remove unused code generator -- Add util function delete folder minio -- Create / update customer branch -- Also consider code from head office -- Add contact name field -- Update status of headoffice so it cannot be delete -- Add code customer field -- Add new endpoint for get or download file -- Add upload file employee endpoint -- Add employee field -- Change uuid to cuid -- Allow disable logger by .env -- Add workflow for local lan deploy -- Add set image endpoints for employee -- Map image -- Add web url -- Check if user exist - -### 🐛 Bug Fixes - -- Unused field -- Raw query relation -- Wrong key -- Code not return -- Wrong relation included -- Wrong instance used -- Error wrong cond -- Condition -- Sql query -- Add image link -- Typo -- Code always update on customer type CORP -- Error fk on empty payload registeredBranch field -- Error on disable log -- Calculation -- Wrong type -- Error and price calc -- Error dep -- Error update on empty productGroupId -- Condition always true -- Relation ordering -- Condition not cover -- Wrong create value -- Delete unused branch cause error new branch same code -- Update branch status when assign user to branch -- Typo 9 (should be 0) -- Wrong condition -- Wrong field used -- Stat should not count user with system role -- Wrong field -- Error due to structure changed -- Customer code come from wrong data -- Missing zero fill -- Error due top field dropped -- Code not convert to uppercase can't create branch -- Order -- Wrong behaviour -- Wrong length slice -- Update field can be optional -- Add relation when get by id -- Wrong string conversion -- Code case - -### 🚜 Refactor - -- User relation -- Adjust code -- Accept branchNo instead of auto -- Change field to null able -- Update auth setting -- Update structure -- Structure -- Update constraints -- Reorder endpoints (affect swagger) -- Swap logger -- Do not update parent status to active -- Change relationship -- Change order -- 💥**breaking**💥 User code gen -- 💥**breaking**💥 Employee code gen -- Filter out system role -- Only filter log api -- Use prisma nested create instead -- Update new employee code gen in quotation endpoint -- Update code gen when change employee branch -- Customer create and update process -- Use nested relation instead -- Dry -- Change datetime field to date only -- Drop field -- Update customer branch file upload endpoint -- Change to response url instead - -### ⚙️ Miscellaneous Tasks - -- Update upload time -- Add migration -- Remove log -- Remove unnecessary -- Remove unused -- Format -- Make nodemon watch .env file - -### Change - -- Branch code now have 5 digit - -### Feaet - -- Protect by roles - -## [0.0.3] - 2024-07-01 - -### 🚀 Features - -- Role based permission endpoints -- Can create branch when create customer -- Also delete branch that not sent on update -- Update query to also return branch -- Prepare for dynamic user type -- Sort stats -- Add missing field -- Update keycloak function -- Employee code gen -- Product group endpoints -- Scope customer branch by customer id -- Count customer by type -- Customer branch attachment -- Update customer branch -- Must not delete if status is not CREATED -- Employee work endpoints -- Product type endpoints -- Minio util func -- Return null if no image exist -- Employee with relation on create / update -- Customer type filter -- Update schema -- Add remark field -- Service api endpoint -- Count data -- Also update customer status to active -- Count employee -- Update field -- Relation and auto gen code -- Search branch by customer code -- Add code to customer branch for query purpose -- Prevent empty foreign id -- Work endpoints -- Scope type by productGroupId -- Prevent invalid groupId sent -- Add count of relation(s) to each record -- Return only one record -- Count employee by gender -- Product endpoints -- Service and product with work relation -- Only get url if object exists -- Change some field to optional -- Also customer all related field -- Feat update employee code -- Filter gender -- Add query string -- Filter status created and active treated as same -- Update work endpoints -- Update product fields -- Add productType relation i/o -- Image endpoint -- Add fields -- Update status on used -- Expose image endpoint to public -- Add product stats -- Make field optional -- Update add status -- Change status of product type after used -- Add parameter for base only work -- Separate service image endpoint -- Add order field -- Order by status field -- Add query product service together -- Add relation to service -- Add query -- Inject sessionId for logging purpose -- Add status query string param -- Add security -- Paging group / type product -- Adjust data type -- Add git ignore -- Add user name to log data -- Employee history -- Add user update info to history -- Stats relation -- Add minio util function - -### 🐛 Bug Fixes - -- Edit should not require telephone no -- Do not remove default role -- Add missing field -- Wrong object delete -- Validate error -- Wrong data type -- Wrong field -- Type -- Change structure -- Type error -- Wrong endpoints -- Typo -- Missing v1 prefix -- Fixed branch no digit -- Input validation -- Wrong table ref -- Missing image url -- Wrong understanding of system -- Wrong relation join -- Wrong cond -- Relation -- Change dev message to code -- Group code -- Product code -- Type code -- Work & service code -- Branch code -- Customer branch code -- Employee code -- Permission & user code -- Auth & role code -- Filter not as expected -- Error not found (wrong table) -- Error productId -- Missing input field -- Update service -- Wrong instance use -- Make optional -- Missing type -- Update status order -- Total count bigint cannot be serialize -- Service not included in result -- Query -- Import -- Missing paging param -- Error relation -- Fk -- Cannot disable user - -### 🚜 Refactor - -- Branch code gen transaction -- Update code gen strategy (branch user) -- Update code gen strategy (customer) -- 💥**breaking**💥 Add v1 prefix to endpoints -- Update isolation level -- Update log -- Move security to route by route -- 💥**breaking**💥 Change typo field and reset migration -- Add field to type - -### ⚙️ Miscellaneous Tasks - -- Db migration add new table -- Format -- Add migration -- Migration - Update migration -- Reorder swagger endpoints -- Deps ver -- Add bracket -- Add format -- Change swagger order -- Add prisma kysely for query builder -- Bumps deps ver -- Update env example - -## [0.0.2] - 2024-04-19 - -### 🚀 Features - -- Also return with contact -- Add field -- Get role list of user -- Edit user role -- Store username -- Add branch image -- Auto gen branch no -- Add hq tel field -- Add more searching field -- Menu and menu component for permission endpoint -- Use role name instead -- Update user code that has no associated branch -- Change to some field to optional -- Update contact to be nullable when request - -### 🐛 Bug Fixes - -- Also delete user in keycloak when delete user -- Update contact endpoint -- Error when update record not found -- Wrong structure return -- Error when not sent role -- Missing parameter username on edit -- Use role name instead (edit endpoint) - -### 🚜 Refactor - -- Add head office indicator to stats -- Add user to keycloak on create user -- Move field lineId contact field -- Move field -- Update branch endpoint -- Add more field -- Change field name - -### ⚙️ Miscellaneous Tasks - -- Add migration -- Cleanup -- Update db -- Db migrate -- Db migration -- Bump deps ver -- Sort tag permission - -## [0.0.1] - 2024-04-11 - -### 🚀 Features - -- Keycloak service add other params -- Add minio client -- Add minio dep -- Keycloak user and role management -- Add province, district, sub-district endpoint -- Change database field to enum with default -- Add branch controller -- Get branch endpoint -- Delete branch endpoint -- Add type for create and update endpoint -- Update database field -- Create branch endpoint -- Edit branch endpoint -- Include relation response when create and delete -- Branch contact controller -- Create branch contact endpoint -- Delete branch contact endpoint -- Add type to http error dev message -- Runtime migration -- Add migration -- User endpoints (crud, many-to-many branch) -- Add elasticsearch -- Add log middleware -- Logging data structure and conditioan level -- Use middleware -- Add more dev message -- Check if user in in used -- Add user stat for each branch -- Temporary generate code for branch and user -- Update status when delete user or branch -- Filter by branch type (head/sub) and relation -- Status input on created and update -- Customer create endpoint -- List customer -- List customer by id -- Delete customer -- Edit customer endpoint -- Add update user data endpoint -- Add customer branch controller -- Add type for create and edit -- Create customer branch endpoint -- Edit customer branch endpoint -- List customer branch -- Get employee of customer branch -- Get customer branch by id -- Delete customer branch -- Add gender field to database -- Auto gen branch code -- Auto gen user code -- Employee endpoints -- Stat by userType -- Stats user by user type -- Require user to change password on first login -- Filter out internal roles (3 for now) -- Add attachment to user controller -- Add more user field -- Auto generate customer code -- Check for permission using roles -- Delete user -- Add query param to include user branch -- Detect self reference -- Emplyee checkup & other info endpoints -- Get branch stats by hq or br -- List by headOfficeId & get with contact - -### 🐛 Bug Fixes - -- Empty user info when crud -- Missing type -- Build script -- Missing package -- Create branch head office condition when not send -- Update condition and response relation -- Missing qr code image url on get -- Error reading variable -- Filter out non-api -- Filter out after finish response -- Image not on delete data -- Remove parent relation -- Delete branch from user wrong body -- Update status once used and must not delete -- Missing auth -- Bad commit 578fc225 -- Missing image url -- Error when record not found on update -- Input type not matched with db -- Error when trying to update -- Error on not exist -- Optional query -- Data ordering -- Type error (temporary) -- Migration reset -- Update type should not require customerType -- Missing full stop -- Typo -- Auto gen user code - -### 🚜 Refactor - -- Change database structure -- Use same function to get img location -- Add devMessage field (useful in front-end) -- Add devMessage to error -- Set status to 201 on create data -- Change method -- Remove suffix from field -- Recreate migration file -- Update schema and migration -- Change from required to not required -- Database fields -- Auto generate code (may change in the future) -- Do not update status if not created -- Customer db -- Update type -- Field name -- Nullable on create -- Change condition order - -### ⚙️ Miscellaneous Tasks - -- Small code adjustment -- Add dev script -- .env example add elasticsearch and minio -- Change devMessage on error -- Deps elasticsearch -- Reset migration -- Migration -- Move file -- Format -- Add tags to open api spec (for sorting purpose) -- Group two controller together -- Restructure -- Remove user branch tag (merged with branch user) -- Sort tag -- Update package name -- Add migration - -### Refacotr - -- Change type from object to string instead diff --git a/cliff.toml b/cliff.toml index 0c34096..7e2e4f7 100644 --- a/cliff.toml +++ b/cliff.toml @@ -86,4 +86,4 @@ topo_order = false # sort the commits inside sections by oldest/newest order sort_commits = "oldest" # limit the number of commits included in the changelog. -# limit_commits = 42 +limit_commits = 300