Skip to content

Commit 30b8bfe

Browse files
committed
Merge branch 'next' into beta
2 parents 310d0c7 + d0e0054 commit 30b8bfe

File tree

5 files changed

+78
-3
lines changed

5 files changed

+78
-3
lines changed

CHANGELOG/CHANGELOG_next.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [2.16.0-rc.2](https://github.com/ReliefApplications/ems-backend/compare/v2.16.0-rc.1...v2.16.0-rc.2) (2025-10-10)
2+
3+
4+
### Features
5+
6+
* Admins can configure auto redirection after cloning from dashboard ([#1212](https://github.com/ReliefApplications/ems-backend/issues/1212)) ([9de1a8c](https://github.com/ReliefApplications/ems-backend/commit/9de1a8c142f1dbf7610e9168a838b0fc86bdba34)), closes [AB#118658](https://github.com/AB/issues/118658)
7+
18
# [2.16.0-rc.1](https://github.com/ReliefApplications/ems-backend/compare/v2.15.0...v2.16.0-rc.1) (2025-09-05)
29

310

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ems-backend",
3-
"version": "2.16.0-rc.1",
3+
"version": "2.16.0-rc.2",
44
"description": "",
55
"main": "index.js",
66
"scripts": {

src/models/actionButton.model.ts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,42 @@ export const buttonSchema = new Schema<Button>(
9797
{
9898
template: String,
9999
autoReload: Boolean,
100+
onSave: {
101+
type: new Schema(
102+
{
103+
navigateTo: {
104+
type: new Schema(
105+
{
106+
targetUrl: {
107+
type: new Schema(
108+
{
109+
href: String,
110+
openInNewTab: { type: Boolean, default: true },
111+
},
112+
{ _id: false }
113+
),
114+
default: null,
115+
},
116+
targetPage: {
117+
type: new Schema(
118+
{
119+
pageUrl: { type: String },
120+
field: { type: String },
121+
},
122+
{ _id: false }
123+
),
124+
default: null,
125+
},
126+
},
127+
{ _id: false }
128+
),
129+
default: null,
130+
},
131+
},
132+
{ _id: false }
133+
),
134+
default: null,
135+
},
100136
},
101137
{ _id: false }
102138
),

src/schema/inputs/button-action.input.ts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,38 @@ const ActionButtonInputType = new GraphQLInputObjectType({
6262
fields: {
6363
template: { type: GraphQLString },
6464
autoReload: { type: GraphQLBoolean },
65+
onSave: {
66+
type: new GraphQLInputObjectType({
67+
name: 'CloneRecordOnSaveInputType',
68+
fields: {
69+
navigateTo: {
70+
type: new GraphQLInputObjectType({
71+
name: 'NavigateToOnSaveInputType',
72+
fields: {
73+
targetUrl: {
74+
type: new GraphQLInputObjectType({
75+
name: 'NavigateToTargetUrlOnSaveInputType',
76+
fields: {
77+
href: { type: GraphQLString },
78+
openInNewTab: { type: GraphQLBoolean },
79+
},
80+
}),
81+
},
82+
targetPage: {
83+
type: new GraphQLInputObjectType({
84+
name: 'NavigateToTargetPageOnSaveInputType',
85+
fields: {
86+
pageUrl: { type: GraphQLString },
87+
field: { type: GraphQLString },
88+
},
89+
}),
90+
},
91+
},
92+
}),
93+
},
94+
},
95+
}),
96+
},
6597
},
6698
}),
6799
},

0 commit comments

Comments
 (0)