-
Notifications
You must be signed in to change notification settings - Fork 10k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMPROVE] Canned response admin settings (#23190)
* small improvements in canned responses settings * remove canned response group settings * fix i18n label * add migration Co-authored-by: Kevin Aleman <kevin.aleman@rocket.chat>
- Loading branch information
1 parent
0d5b0b3
commit 7388867
Showing
6 changed files
with
36 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
import { settings } from '../../../../app/settings'; | ||
|
||
export const createSettings = () => { | ||
settings.addGroup('Canned_Responses', function() { | ||
this.section('Canned_Responses', function() { | ||
this.add('Canned_Responses_Enable', false, { | ||
type: 'boolean', | ||
public: true, | ||
enterprise: true, | ||
invalidValue: false, | ||
modules: [ | ||
'canned-responses', | ||
], | ||
}); | ||
}); | ||
settings.add('Canned_Responses_Enable', true, { | ||
group: 'Omnichannel', | ||
section: 'Canned_Responses', | ||
type: 'boolean', | ||
public: true, | ||
enterprise: true, | ||
invalidValue: false, | ||
modules: [ | ||
'canned-responses', | ||
], | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -232,4 +232,5 @@ import './v232'; | |
import './v233'; | ||
import './v234'; | ||
import './v235'; | ||
import './v236'; | ||
import './xrun'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { Migrations } from '../../../app/migrations/server'; | ||
import { Settings } from '../../../app/models/server'; | ||
|
||
Migrations.add({ | ||
version: 236, | ||
up() { | ||
Settings.removeById('Canned Responses'); | ||
Settings.removeById('Canned_Responses'); | ||
|
||
Settings.upsert( | ||
{ | ||
_id: 'Canned_Responses_Enable', | ||
}, | ||
{ | ||
$set: { | ||
group: 'Omnichannel', | ||
}, | ||
}, | ||
); | ||
}, | ||
}); |