Listform genel düzenelemeler seeder
This commit is contained in:
parent
7bd6216515
commit
27c298c245
6 changed files with 492 additions and 458 deletions
|
|
@ -9551,7 +9551,7 @@
|
|||
"resourceName": "Platform",
|
||||
"key": "App.SupplyChain.PurchaseOrder",
|
||||
"tr": "Siparişler",
|
||||
"en": "Orders"
|
||||
"en": "Purchase Orders"
|
||||
},
|
||||
{
|
||||
"resourceName": "Platform",
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ function FormTabDatabaseDelete({
|
|||
name="deleteCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DatabaseDeleteCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
/>
|
||||
</FormItem>
|
||||
<Button block variant="solid" loading={isSubmitting}>
|
||||
|
|
@ -83,28 +84,6 @@ function FormTabDatabaseDelete({
|
|||
</Button>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
className="my-2"
|
||||
header={translate('::ListForms.ListFormEdit.DatabasePreviewTSQL')}
|
||||
>
|
||||
<span>{sqlQuery}</span>
|
||||
<Button
|
||||
block
|
||||
type="button"
|
||||
variant="twoTone"
|
||||
className="mt-5"
|
||||
onClick={async () => {
|
||||
const resp = await getListFormDataQueryByCode(initialValues.listFormCode, 2)
|
||||
setSqlQuery(resp.data)
|
||||
}}
|
||||
>
|
||||
{translate('::Preview')}
|
||||
</Button>
|
||||
</Card>
|
||||
</FormContainer>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
<Card
|
||||
className="my-2"
|
||||
bodyClass="p-0"
|
||||
|
|
@ -125,7 +104,8 @@ function FormTabDatabaseDelete({
|
|||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setData({
|
||||
tabName: ListFormEditTabs.Database.Delete.DeleteFieldsDefaultValuesJsonRow,
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Delete.DeleteFieldsDefaultValuesJsonRow,
|
||||
operation: 'create',
|
||||
id: initialValues.id ?? '',
|
||||
index: -1,
|
||||
|
|
@ -156,7 +136,8 @@ function FormTabDatabaseDelete({
|
|||
onClick={() => {
|
||||
setData({
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Delete.DeleteFieldsDefaultValuesJsonRow,
|
||||
ListFormEditTabs.Database.Delete
|
||||
.DeleteFieldsDefaultValuesJsonRow,
|
||||
operation: 'update',
|
||||
id: initialValues.id ?? '',
|
||||
index,
|
||||
|
|
@ -175,7 +156,8 @@ function FormTabDatabaseDelete({
|
|||
onClick={() => {
|
||||
setData({
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Delete.DeleteFieldsDefaultValuesJsonRow,
|
||||
ListFormEditTabs.Database.Delete
|
||||
.DeleteFieldsDefaultValuesJsonRow,
|
||||
operation: 'delete',
|
||||
id: initialValues.id ?? '',
|
||||
index,
|
||||
|
|
@ -186,7 +168,9 @@ function FormTabDatabaseDelete({
|
|||
</div>
|
||||
</Td>
|
||||
<Td>{row.fieldName}</Td>
|
||||
<Td>{dbSourceTypeOptions.find((a: any) => a.value === row.fieldDbType)?.label}</Td>
|
||||
<Td>
|
||||
{dbSourceTypeOptions.find((a: any) => a.value === row.fieldDbType)?.label}
|
||||
</Td>
|
||||
<Td>{FieldCustomValueTypeEnum[row.customValueType]}</Td>
|
||||
<Td>{row.value}</Td>
|
||||
<Td className="break-all">{row.sqlQuery}</Td>
|
||||
|
|
@ -195,6 +179,29 @@ function FormTabDatabaseDelete({
|
|||
</TBody>
|
||||
</Table>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
className="my-2"
|
||||
header={translate('::ListForms.ListFormEdit.DatabasePreviewTSQL')}
|
||||
>
|
||||
<span>{sqlQuery}</span>
|
||||
<Button
|
||||
block
|
||||
type="button"
|
||||
variant="twoTone"
|
||||
className="mt-5"
|
||||
onClick={async () => {
|
||||
const resp = await getListFormDataQueryByCode(initialValues.listFormCode, 2)
|
||||
setSqlQuery(resp.data)
|
||||
}}
|
||||
>
|
||||
{translate('::Preview')}
|
||||
</Button>
|
||||
</Card>
|
||||
</FormContainer>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ function FormTabDatabaseInsert({
|
|||
name="insertCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DatabaseInsertCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
/>
|
||||
</FormItem>
|
||||
<Button block variant="solid" loading={isSubmitting}>
|
||||
|
|
@ -83,35 +84,11 @@ function FormTabDatabaseInsert({
|
|||
</Button>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
className="my-2"
|
||||
header={translate('::ListForms.ListFormEdit.DatabasePreviewTSQL')}
|
||||
>
|
||||
<span>{sqlQuery}</span>
|
||||
<Button
|
||||
block
|
||||
type="button"
|
||||
variant="twoTone"
|
||||
className="mt-5"
|
||||
onClick={async () => {
|
||||
const resp = await getListFormDataQueryByCode(initialValues.listFormCode, 0)
|
||||
setSqlQuery(resp.data)
|
||||
}}
|
||||
>
|
||||
{translate('::Preview')}
|
||||
</Button>
|
||||
</Card>
|
||||
</FormContainer>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
<Card
|
||||
className="my-2"
|
||||
bodyClass="p-0"
|
||||
header={translate('::ListForms.ListFormEdit.DatabaseInsertFieldsDefaultValues')}
|
||||
headerExtra={translate(
|
||||
'::ListForms.ListFormEdit.DatabaseDefaultValuesDescription',
|
||||
)}
|
||||
headerExtra={translate('::ListForms.ListFormEdit.DatabaseDefaultValuesDescription')}
|
||||
>
|
||||
<Table compact>
|
||||
<THead>
|
||||
|
|
@ -127,7 +104,8 @@ function FormTabDatabaseInsert({
|
|||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setData({
|
||||
tabName: ListFormEditTabs.Database.Insert.InsertFieldsDefaultValuesJsonRow,
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Insert.InsertFieldsDefaultValuesJsonRow,
|
||||
operation: 'create',
|
||||
id: initialValues.id ?? '',
|
||||
index: -1,
|
||||
|
|
@ -158,7 +136,8 @@ function FormTabDatabaseInsert({
|
|||
onClick={() => {
|
||||
setData({
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Insert.InsertFieldsDefaultValuesJsonRow,
|
||||
ListFormEditTabs.Database.Insert
|
||||
.InsertFieldsDefaultValuesJsonRow,
|
||||
operation: 'update',
|
||||
id: initialValues.id ?? '',
|
||||
index,
|
||||
|
|
@ -177,7 +156,8 @@ function FormTabDatabaseInsert({
|
|||
onClick={() => {
|
||||
setData({
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Insert.InsertFieldsDefaultValuesJsonRow,
|
||||
ListFormEditTabs.Database.Insert
|
||||
.InsertFieldsDefaultValuesJsonRow,
|
||||
operation: 'delete',
|
||||
id: initialValues.id ?? '',
|
||||
index,
|
||||
|
|
@ -188,7 +168,9 @@ function FormTabDatabaseInsert({
|
|||
</div>
|
||||
</Td>
|
||||
<Td>{row.fieldName}</Td>
|
||||
<Td>{dbSourceTypeOptions.find((a: any) => a.value === row.fieldDbType)?.label}</Td>
|
||||
<Td>
|
||||
{dbSourceTypeOptions.find((a: any) => a.value === row.fieldDbType)?.label}
|
||||
</Td>
|
||||
<Td>{FieldCustomValueTypeEnum[row.customValueType]}</Td>
|
||||
<Td>{row.value}</Td>
|
||||
<Td className="break-all">{row.sqlQuery}</Td>
|
||||
|
|
@ -200,7 +182,9 @@ function FormTabDatabaseInsert({
|
|||
<Card
|
||||
className="my-2"
|
||||
bodyClass="p-0"
|
||||
header={translate('::ListForms.ListFormEdit.DatabaseFormDefaultFieldsDefaultValues')}
|
||||
header={translate(
|
||||
'::ListForms.ListFormEdit.DatabaseFormDefaultFieldsDefaultValues',
|
||||
)}
|
||||
headerExtra={translate(
|
||||
'::ListForms.ListFormEdit.DatabaseFormDefaultFieldsDefaultValuesDescription',
|
||||
)}
|
||||
|
|
@ -219,7 +203,8 @@ function FormTabDatabaseInsert({
|
|||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setData({
|
||||
tabName: ListFormEditTabs.Database.Insert.FormFieldsDefaultValuesJsonRow,
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Insert.FormFieldsDefaultValuesJsonRow,
|
||||
operation: 'create',
|
||||
id: initialValues.id ?? '',
|
||||
index: -1,
|
||||
|
|
@ -249,7 +234,8 @@ function FormTabDatabaseInsert({
|
|||
icon={<FaEdit />}
|
||||
onClick={() => {
|
||||
setData({
|
||||
tabName: ListFormEditTabs.Database.Insert.FormFieldsDefaultValuesJsonRow,
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Insert.FormFieldsDefaultValuesJsonRow,
|
||||
operation: 'update',
|
||||
id: initialValues.id ?? '',
|
||||
index,
|
||||
|
|
@ -267,7 +253,8 @@ function FormTabDatabaseInsert({
|
|||
icon={<FaTrash />}
|
||||
onClick={() => {
|
||||
setData({
|
||||
tabName: ListFormEditTabs.Database.Insert.FormFieldsDefaultValuesJsonRow,
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Insert.FormFieldsDefaultValuesJsonRow,
|
||||
operation: 'delete',
|
||||
id: initialValues.id ?? '',
|
||||
index,
|
||||
|
|
@ -278,7 +265,9 @@ function FormTabDatabaseInsert({
|
|||
</div>
|
||||
</Td>
|
||||
<Td>{row.fieldName}</Td>
|
||||
<Td>{dbSourceTypeOptions.find((a: any) => a.value === row.fieldDbType)?.label}</Td>
|
||||
<Td>
|
||||
{dbSourceTypeOptions.find((a: any) => a.value === row.fieldDbType)?.label}
|
||||
</Td>
|
||||
<Td>{FieldCustomValueTypeEnum[row.customValueType]}</Td>
|
||||
<Td>{row.value}</Td>
|
||||
<Td className="break-all">{row.sqlQuery}</Td>
|
||||
|
|
@ -287,6 +276,29 @@ function FormTabDatabaseInsert({
|
|||
</TBody>
|
||||
</Table>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
className="my-2"
|
||||
header={translate('::ListForms.ListFormEdit.DatabasePreviewTSQL')}
|
||||
>
|
||||
<span>{sqlQuery}</span>
|
||||
<Button
|
||||
block
|
||||
type="button"
|
||||
variant="twoTone"
|
||||
className="mt-5"
|
||||
onClick={async () => {
|
||||
const resp = await getListFormDataQueryByCode(initialValues.listFormCode, 0)
|
||||
setSqlQuery(resp.data)
|
||||
}}
|
||||
>
|
||||
{translate('::Preview')}
|
||||
</Button>
|
||||
</Card>
|
||||
</FormContainer>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,32 +70,12 @@ function FormTabDatabaseSelect({
|
|||
</Button>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
className="my-2"
|
||||
header={translate('::ListForms.ListFormEdit.DatabasePreviewTSQL')}
|
||||
>
|
||||
<span>{sqlQuery}</span>
|
||||
<Button
|
||||
block
|
||||
type="button"
|
||||
variant="twoTone"
|
||||
className="mt-5"
|
||||
onClick={async () => {
|
||||
const resp = await getListFormSelectQueryByCode(initialValues.listFormCode)
|
||||
setSqlQuery(resp.data)
|
||||
}}
|
||||
>
|
||||
{translate('::Preview')}
|
||||
</Button>
|
||||
</Card>
|
||||
</FormContainer>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
<Card
|
||||
className="my-2"
|
||||
bodyClass="p-0"
|
||||
header={translate('::ListForms.ListFormEdit.DatabaseSelectSelectFieldsDefaultValues')}
|
||||
header={translate(
|
||||
'::ListForms.ListFormEdit.DatabaseSelectSelectFieldsDefaultValues',
|
||||
)}
|
||||
headerExtra={translate(
|
||||
'::ListForms.ListFormEdit.DatabaseSelectSelectFieldsDefaultValuesDescription',
|
||||
)}
|
||||
|
|
@ -114,7 +94,8 @@ function FormTabDatabaseSelect({
|
|||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setData({
|
||||
tabName: ListFormEditTabs.Database.Select.SelectFieldsDefaultValuesJsonRow,
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Select.SelectFieldsDefaultValuesJsonRow,
|
||||
operation: 'create',
|
||||
id: initialValues.id ?? '',
|
||||
index: -1,
|
||||
|
|
@ -145,7 +126,8 @@ function FormTabDatabaseSelect({
|
|||
onClick={() => {
|
||||
setData({
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Select.SelectFieldsDefaultValuesJsonRow,
|
||||
ListFormEditTabs.Database.Select
|
||||
.SelectFieldsDefaultValuesJsonRow,
|
||||
operation: 'update',
|
||||
id: initialValues.id ?? '',
|
||||
index,
|
||||
|
|
@ -164,7 +146,8 @@ function FormTabDatabaseSelect({
|
|||
onClick={() => {
|
||||
setData({
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Select.SelectFieldsDefaultValuesJsonRow,
|
||||
ListFormEditTabs.Database.Select
|
||||
.SelectFieldsDefaultValuesJsonRow,
|
||||
operation: 'delete',
|
||||
id: initialValues.id ?? '',
|
||||
index,
|
||||
|
|
@ -175,7 +158,9 @@ function FormTabDatabaseSelect({
|
|||
</div>
|
||||
</Td>
|
||||
<Td>{row.fieldName}</Td>
|
||||
<Td>{dbSourceTypeOptions.find((a: any) => a.value === row.fieldDbType)?.label}</Td>
|
||||
<Td>
|
||||
{dbSourceTypeOptions.find((a: any) => a.value === row.fieldDbType)?.label}
|
||||
</Td>
|
||||
<Td>{FieldCustomValueTypeEnum[row.customValueType]}</Td>
|
||||
<Td>{row.value}</Td>
|
||||
<Td className="break-all">{row.sqlQuery}</Td>
|
||||
|
|
@ -184,6 +169,29 @@ function FormTabDatabaseSelect({
|
|||
</TBody>
|
||||
</Table>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
className="my-2"
|
||||
header={translate('::ListForms.ListFormEdit.DatabasePreviewTSQL')}
|
||||
>
|
||||
<span>{sqlQuery}</span>
|
||||
<Button
|
||||
block
|
||||
type="button"
|
||||
variant="twoTone"
|
||||
className="mt-5"
|
||||
onClick={async () => {
|
||||
const resp = await getListFormSelectQueryByCode(initialValues.listFormCode)
|
||||
setSqlQuery(resp.data)
|
||||
}}
|
||||
>
|
||||
{translate('::Preview')}
|
||||
</Button>
|
||||
</Card>
|
||||
</FormContainer>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ function FormTabDatabaseUpdate({
|
|||
name="updateCommand"
|
||||
placeholder={translate('::ListForms.ListFormEdit.DatabaseUpdateCommand')}
|
||||
component={Input}
|
||||
textArea={true}
|
||||
/>
|
||||
</FormItem>
|
||||
<Button block variant="solid" loading={isSubmitting}>
|
||||
|
|
@ -83,28 +84,6 @@ function FormTabDatabaseUpdate({
|
|||
</Button>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
className="my-2"
|
||||
header={translate('::ListForms.ListFormEdit.DatabasePreviewTSQL')}
|
||||
>
|
||||
<span>{sqlQuery}</span>
|
||||
<Button
|
||||
block
|
||||
type="button"
|
||||
variant="twoTone"
|
||||
className="mt-5"
|
||||
onClick={async () => {
|
||||
const resp = await getListFormDataQueryByCode(initialValues.listFormCode, 1)
|
||||
setSqlQuery(resp.data)
|
||||
}}
|
||||
>
|
||||
{translate('::Preview')}
|
||||
</Button>
|
||||
</Card>
|
||||
</FormContainer>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
<Card
|
||||
className="my-2"
|
||||
bodyClass="p-0"
|
||||
|
|
@ -127,7 +106,8 @@ function FormTabDatabaseUpdate({
|
|||
onClick={async (e) => {
|
||||
e.preventDefault()
|
||||
setData({
|
||||
tabName: ListFormEditTabs.Database.Update.UpdateFieldsDefaultValuesJsonRow,
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Update.UpdateFieldsDefaultValuesJsonRow,
|
||||
operation: 'create',
|
||||
id: initialValues.id ?? '',
|
||||
index: -1,
|
||||
|
|
@ -158,7 +138,8 @@ function FormTabDatabaseUpdate({
|
|||
onClick={() => {
|
||||
setData({
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Update.UpdateFieldsDefaultValuesJsonRow,
|
||||
ListFormEditTabs.Database.Update
|
||||
.UpdateFieldsDefaultValuesJsonRow,
|
||||
operation: 'update',
|
||||
id: initialValues.id ?? '',
|
||||
index,
|
||||
|
|
@ -177,7 +158,8 @@ function FormTabDatabaseUpdate({
|
|||
onClick={() => {
|
||||
setData({
|
||||
tabName:
|
||||
ListFormEditTabs.Database.Update.UpdateFieldsDefaultValuesJsonRow,
|
||||
ListFormEditTabs.Database.Update
|
||||
.UpdateFieldsDefaultValuesJsonRow,
|
||||
operation: 'delete',
|
||||
id: initialValues.id ?? '',
|
||||
index,
|
||||
|
|
@ -188,7 +170,9 @@ function FormTabDatabaseUpdate({
|
|||
</div>
|
||||
</Td>
|
||||
<Td>{row.fieldName}</Td>
|
||||
<Td>{dbSourceTypeOptions.find((a: any) => a.value === row.fieldDbType)?.label}</Td>
|
||||
<Td>
|
||||
{dbSourceTypeOptions.find((a: any) => a.value === row.fieldDbType)?.label}
|
||||
</Td>
|
||||
<Td>{FieldCustomValueTypeEnum[row.customValueType]}</Td>
|
||||
<Td>{row.value}</Td>
|
||||
<Td className="break-all">{row.sqlQuery}</Td>
|
||||
|
|
@ -197,6 +181,29 @@ function FormTabDatabaseUpdate({
|
|||
</TBody>
|
||||
</Table>
|
||||
</Card>
|
||||
|
||||
<Card
|
||||
className="my-2"
|
||||
header={translate('::ListForms.ListFormEdit.DatabasePreviewTSQL')}
|
||||
>
|
||||
<span>{sqlQuery}</span>
|
||||
<Button
|
||||
block
|
||||
type="button"
|
||||
variant="twoTone"
|
||||
className="mt-5"
|
||||
onClick={async () => {
|
||||
const resp = await getListFormDataQueryByCode(initialValues.listFormCode, 1)
|
||||
setSqlQuery(resp.data)
|
||||
}}
|
||||
>
|
||||
{translate('::Preview')}
|
||||
</Button>
|
||||
</Card>
|
||||
</FormContainer>
|
||||
</Form>
|
||||
)}
|
||||
</Formik>
|
||||
</Container>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ function JsonRowOpDialogDatabase({
|
|||
type="text"
|
||||
autoComplete="off"
|
||||
name="fieldName"
|
||||
placeholder={translate('::ListForms.ListFormEdit.FieldName')}
|
||||
placeholder={translate('::ListForms.ListFormFieldEdit.FieldName')}
|
||||
component={Input}
|
||||
/>
|
||||
</FormItem>
|
||||
|
|
|
|||
Loading…
Reference in a new issue