AddPageUrl eklendi
This commit is contained in:
parent
8c8ee2a72a
commit
e5bc185c19
5 changed files with 53 additions and 10 deletions
|
|
@ -39,5 +39,9 @@ public class GridEditingDto
|
||||||
/// Form post edilirken sadece değişen sütunları veya tümünü gönderir
|
/// Form post edilirken sadece değişen sütunları veya tümünü gönderir
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool SendOnlyChangedFormValuesUpdate { get; set; } = false;
|
public bool SendOnlyChangedFormValuesUpdate { get; set; } = false;
|
||||||
|
/// <summary>
|
||||||
|
/// Popup olarak açılmadan yeni kayıt ekleme işlemi yapılacaksa, yeni kaydın ekleneceği sayfanın url'si
|
||||||
|
/// </summary>
|
||||||
|
public string AddPageUrl { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4038,6 +4038,12 @@
|
||||||
"en": "Allow Adding",
|
"en": "Allow Adding",
|
||||||
"tr": "Eklemeye İzin Ver"
|
"tr": "Eklemeye İzin Ver"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"resourceName": "Platform",
|
||||||
|
"key": "ListForms.ListFormEdit.EditingAddPageUrl",
|
||||||
|
"en": "Add Page Url",
|
||||||
|
"tr": "Ek Sayfa Url'si"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"resourceName": "Platform",
|
"resourceName": "Platform",
|
||||||
"key": "ListForms.ListFormEdit.EditingAllowEditing",
|
"key": "ListForms.ListFormEdit.EditingAllowEditing",
|
||||||
|
|
|
||||||
|
|
@ -460,6 +460,7 @@ export interface GridEditingDto {
|
||||||
isTenant: boolean
|
isTenant: boolean
|
||||||
isBranch: boolean
|
isBranch: boolean
|
||||||
isOrganizationUnit: boolean
|
isOrganizationUnit: boolean
|
||||||
|
addPageUrl?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EditingFormDto {
|
export interface EditingFormDto {
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,22 @@ function FormTabEdit(props: FormEditProps & { listFormCode: string }) {
|
||||||
component={Checkbox}
|
component={Checkbox}
|
||||||
/>
|
/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
<FormItem
|
||||||
|
label={translate('::ListForms.ListFormEdit.EditingAddPageUrl')}
|
||||||
|
invalid={
|
||||||
|
errors.editingOptionDto?.addPageUrl &&
|
||||||
|
touched.editingOptionDto?.addPageUrl
|
||||||
|
}
|
||||||
|
errorMessage={errors.editingOptionDto?.addPageUrl}
|
||||||
|
>
|
||||||
|
<Field
|
||||||
|
type="text"
|
||||||
|
autoComplete="off"
|
||||||
|
name="editingOptionDto.addPageUrl"
|
||||||
|
placeholder={translate('::ListForms.ListFormEdit.EditingAddPageUrl')}
|
||||||
|
component={Input}
|
||||||
|
/>
|
||||||
|
</FormItem>
|
||||||
<FormItem
|
<FormItem
|
||||||
label={translate('::ListForms.ListFormEdit.EditingAllowEditing')}
|
label={translate('::ListForms.ListFormEdit.EditingAllowEditing')}
|
||||||
invalid={
|
invalid={
|
||||||
|
|
|
||||||
|
|
@ -73,16 +73,32 @@ const useToolbar = ({
|
||||||
|
|
||||||
// Add InsertNewRecord button
|
// Add InsertNewRecord button
|
||||||
if (grdOpt.editingOptionDto?.allowAdding && checkPermission(grdOpt.permissionDto?.c)) {
|
if (grdOpt.editingOptionDto?.allowAdding && checkPermission(grdOpt.permissionDto?.c)) {
|
||||||
items.push({
|
if (grdOpt.editingOptionDto?.addPageUrl) {
|
||||||
locateInMenu: 'auto',
|
items.push({
|
||||||
showText: 'always',
|
widget: 'dxButton',
|
||||||
name: 'addRowButton',
|
showText: 'always',
|
||||||
location: 'after',
|
name: 'addRowButton',
|
||||||
options: {
|
location: 'after',
|
||||||
text: translate('::ListForms.ListForm.AddNewRecord'),
|
options: {
|
||||||
hint: translate('::ListForms.ListForm.AddNewRecord'),
|
text: translate('::ListForms.ListForm.AddNewRecord'),
|
||||||
},
|
hint: translate('::ListForms.ListForm.AddNewRecord'),
|
||||||
})
|
onClick() {
|
||||||
|
window.open(grdOpt.editingOptionDto?.addPageUrl, isPwaMode ? '_self' : '_blank')
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
items.push({
|
||||||
|
locateInMenu: 'auto',
|
||||||
|
showText: 'always',
|
||||||
|
name: 'addRowButton',
|
||||||
|
location: 'after',
|
||||||
|
options: {
|
||||||
|
text: translate('::ListForms.ListForm.AddNewRecord'),
|
||||||
|
hint: translate('::ListForms.ListForm.AddNewRecord'),
|
||||||
|
},
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue