Form Fields Permission Import eklendi
This commit is contained in:
parent
8549c8fc8a
commit
6645aae712
7 changed files with 10716 additions and 5 deletions
|
|
@ -8,4 +8,5 @@ public class ListFormFieldPermissionDto
|
|||
public string R { get; set; }
|
||||
public string U { get; set; }
|
||||
public bool E { get; set; }
|
||||
public bool I { get; set; }
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -3607,6 +3607,12 @@
|
|||
"en": "Export",
|
||||
"tr": "Dışa Ver"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormFieldEdit.PermissionsImport",
|
||||
"en": "Import",
|
||||
"tr": "İçe Aktar"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
"key": "ListForms.ListFormEdit.PermissionsDelete",
|
||||
|
|
|
|||
10410
ui/package-lock.json
generated
Normal file
10410
ui/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -17,6 +17,7 @@ import { ImportProgress } from './ImportProgress'
|
|||
import { ListFormImportDto, ListFormImportExecuteDto } from '@/proxy/imports/models'
|
||||
import { ImportService } from '@/services/import.service'
|
||||
import { GridDto } from '@/proxy/form/models'
|
||||
import { ColumnFormatEditDto } from '@/proxy/admin/list-form-field/models';
|
||||
|
||||
interface ImportDashboardProps {
|
||||
gridDto: GridDto
|
||||
|
|
@ -209,10 +210,7 @@ export const ImportDashboard: React.FC<ImportDashboardProps> = ({ gridDto }) =>
|
|||
const getEditableColumns = () => {
|
||||
return gridDto.columnFormats.filter(
|
||||
(col: any) =>
|
||||
col.visible &&
|
||||
col.columnEditingDto.allowEditing &&
|
||||
col.canCreate &&
|
||||
!col.readOnly &&
|
||||
col.permissionDto.i &&
|
||||
col.fieldName !== 'Id',
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export class ImportService {
|
|||
|
||||
async generateTemplate(gridDto: GridDto, format: 'excel' | 'csv'): Promise<Blob> {
|
||||
const editableColumns = gridDto.columnFormats
|
||||
.filter((col) => col.visible && col.canCreate && !col.readOnly && col.fieldName !== 'Id')
|
||||
.filter((col) => col.permissionDto.i && col.fieldName !== 'Id')
|
||||
.sort((a, b) => a.listOrderNo - b.listOrderNo)
|
||||
|
||||
if (format === 'excel') {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ const schema = object().shape({
|
|||
c: string(),
|
||||
u: string(),
|
||||
e: bool(),
|
||||
i: bool(),
|
||||
deny: bool(),
|
||||
}),
|
||||
})
|
||||
|
|
@ -150,6 +151,13 @@ function FormFieldTabPermissions({
|
|||
>
|
||||
<Field name="permissionDto.e" component={Checkbox} />
|
||||
</FormItem>
|
||||
<FormItem
|
||||
label={translate('::ListForms.ListFormFieldEdit.PermissionsImport')}
|
||||
invalid={errors.permissionDto?.i && touched.permissionDto?.i}
|
||||
errorMessage={errors.permissionDto?.i}
|
||||
>
|
||||
<Field name="permissionDto.i" component={Checkbox} />
|
||||
</FormItem>
|
||||
|
||||
<Button block variant="solid" loading={isSubmitting} type="submit">
|
||||
{isSubmitting ? translate('::SavingWithThreeDot') : translate('::Save')}
|
||||
|
|
|
|||
Loading…
Reference in a new issue