# Pull Request Template ## Description This PR adds inline editing support for contact name, phone number, email, and company fields in the conversation contact sidebar ## Type of change - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? **Screencast** https://github.com/user-attachments/assets/e9f8e37d-145b-4736-b27a-eb9ea66847bd ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: Pranav <pranav@chatwoot.com> Co-authored-by: Muhsin Keloth <muhsinkeramam@gmail.com>
25 lines
707 B
JavaScript
25 lines
707 B
JavaScript
/* eslint-disable max-classes-per-file */
|
|
export class DuplicateContactException extends Error {
|
|
static DEFAULT_MESSAGE = 'DUPLICATE_CONTACT';
|
|
|
|
constructor(data) {
|
|
super(DuplicateContactException.DEFAULT_MESSAGE);
|
|
this.data = data;
|
|
this.name = 'DuplicateContactException';
|
|
}
|
|
|
|
/** Server or client may assign `message` after construction; otherwise still DEFAULT_MESSAGE. */
|
|
get contactErrorDetail() {
|
|
return this.message === DuplicateContactException.DEFAULT_MESSAGE
|
|
? null
|
|
: this.message;
|
|
}
|
|
}
|
|
export class ExceptionWithMessage extends Error {
|
|
constructor(data) {
|
|
super('ERROR_WITH_MESSAGE');
|
|
this.data = data;
|
|
this.name = 'ExceptionWithMessage';
|
|
}
|
|
}
|