M: Minor UI fixes and coverage fix

This commit is contained in:
Ivan 2024-08-19 18:32:41 +03:00
parent 35dbb6d201
commit 94f9eabfdf
5 changed files with 6 additions and 5 deletions

View File

@ -159,7 +159,7 @@ function PickSubstitutions({
id: 'right_alias',
size: 65,
cell: props => (
<BadgeConstituenta theme={colors} value={props.row.original.original} prefixID={`${prefixID}_1_`} />
<BadgeConstituenta theme={colors} value={props.row.original.original} prefixID={`${prefixID}_2_`} />
)
}),
columnHelper.accessor(item => item.original_source.alias, {

View File

@ -45,6 +45,7 @@ function DlgDeleteOperation({ hideWindow, target, onSubmit }: DlgDeleteOperation
titleHtml='Наследованные конституенты <br/>превратятся в дописанные'
value={keepConstituents}
setValue={setKeepConstituents}
disabled={target.result === null}
/>
<Checkbox
label='Удалить схему'
@ -55,7 +56,7 @@ function DlgDeleteOperation({ hideWindow, target, onSubmit }: DlgDeleteOperation
}
value={deleteSchema}
setValue={setDeleteSchema}
disabled={!target.is_owned || target.result === undefined}
disabled={!target.is_owned || target.result === null}
/>
</Modal>
);

View File

@ -357,7 +357,7 @@ function OssFlow({ isModified, setIsModified }: OssFlowProps) {
fitView
nodeTypes={OssNodeTypes}
maxZoom={2}
minZoom={0.75}
minZoom={0.5}
nodesConnectable={false}
snapToGrid={true}
snapGrid={[PARAMETER.ossGridSize, PARAMETER.ossGridSize]}

View File

@ -220,7 +220,7 @@ function FormConstituenta({
label={isBasic ? 'Конвенция' : 'Комментарий'}
placeholder={isBasic ? 'Договоренность об интерпретации' : 'Пояснение разработчика'}
value={convention}
disabled={disabled}
disabled={disabled || (isBasic && state?.is_inherited)}
rows={convention.length > 2 * ROW_SIZE_IN_CHARACTERS || convention.includes('\n') ? 4 : 2}
onChange={event => setConvention(event.target.value)}
/>

View File

@ -11,7 +11,7 @@ function BackendCoverage() {
$coverageExec = "$backend\venv\Scripts\coverage.exe"
$djangoSrc = "$backend\manage.py"
$exclude = '*/venv/*,*/tests/*,*/migrations/*,*__init__.py,manage.py,apps.py,urls.py,settings.py'
$exclude = '*/venv/*,*/tests/*,*/migrations/*,*__init__.py,shared/*,manage.py,apps.py,urls.py,settings.py,admin.py'
& $coverageExec run --omit=$exclude $djangoSrc test
& $coverageExec report