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
|
||||
/// </summary>
|
||||
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",
|
||||
"tr": "Eklemeye İzin Ver"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.EditingAddPageUrl",
|
||||
"en": "Add Page Url",
|
||||
"tr": "Ek Sayfa Url'si"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.EditingAllowEditing",
|
||||
|
|
|
|||
|
|
@ -460,6 +460,7 @@ export interface GridEditingDto {
|
|||
isTenant: boolean
|
||||
isBranch: boolean
|
||||
isOrganizationUnit: boolean
|
||||
addPageUrl?: string
|
||||
}
|
||||
|
||||
export interface EditingFormDto {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,22 @@ function FormTabEdit(props: FormEditProps & { listFormCode: string }) {
|
|||
component={Checkbox}
|
||||
/>
|
||||
</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
|
||||
label={translate('::ListForms.ListFormEdit.EditingAllowEditing')}
|
||||
invalid={
|
||||
|
|
|
|||
|
|
@ -73,6 +73,21 @@ const useToolbar = ({
|
|||
|
||||
// Add InsertNewRecord button
|
||||
if (grdOpt.editingOptionDto?.allowAdding && checkPermission(grdOpt.permissionDto?.c)) {
|
||||
if (grdOpt.editingOptionDto?.addPageUrl) {
|
||||
items.push({
|
||||
widget: 'dxButton',
|
||||
showText: 'always',
|
||||
name: 'addRowButton',
|
||||
location: 'after',
|
||||
options: {
|
||||
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',
|
||||
|
|
@ -84,6 +99,7 @@ const useToolbar = ({
|
|||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
items.push({
|
||||
widget: 'dxButton',
|
||||
|
|
|
|||
Loading…
Reference in a new issue