refactor: streamline form fields and update ComboBox options in cadastro_jogos desktop XML
davinTI/jogos_matheus/pipeline/head There was a failure building this commit

This commit is contained in:
Matheus
2026-09-24 16:15:43 -03:00
parent 203a323653
commit 8256d40b41
+12 -23
View File
@@ -140,7 +140,6 @@
} }
}); });
}}; }};
function showTableReviews(gameId) { function showTableReviews(gameId) {
if(!gameId) { if(!gameId) {
var lib_msg = libService.loadScript("messages"); var lib_msg = libService.loadScript("messages");
@@ -207,7 +206,7 @@
} }
var value = engine.getField("dcfNota").getValue(); var value = engine.getField("dcfNota").getValue();
if(value === null || value === ""){ if(value === null || value === ""){
return true; /* obrigatoriedade tratada pelo required */ return true;
} }
return value >= 0 && value <= 10; return value >= 0 && value <= 10;
}; };
@@ -557,27 +556,17 @@
<VerticalLayout width="100%" height="100%" align="MIDDLE_CENTER" spacing="true"> <VerticalLayout width="100%" height="100%" align="MIDDLE_CENTER" spacing="true">
<Panel id="pnlDadosJogo" width="100%" expandRatio="0.7" height="100%" margin="true" > <Panel id="pnlDadosJogo" width="100%" expandRatio="0.7" height="100%" margin="true" >
<VerticalLayout caption="Dados do Jogo" width="100%" spacing="true"> <VerticalLayout caption="Dados do Jogo" width="100%" spacing="true">
<TextField id="txfCodigo" caption="Código" type="number" <TextField id="txfCodigo" caption="Código" type="number" width="100%" enabled="false" visible="false"/>
width="100%" enabled="false" visible="false" /> <NumericField id="txfNotaMedia" caption="Nota Média" type="number" width="100%" enabled="false" visible="false"/>
<NumericField id="txfNotaMedia" caption="Nota média" <TextField id="txfTitulo" caption="Título" type="string" width="100%" required="true" minLength="3"/>
type="number" <ComboBox id="cbbGenero" type="string" caption="Gênero" width="100%" required="true">
width="100%" enabled="false" visible="false" /> <entry key="ACAO" value="Ação"/>
<TextField id="txfTitulo" caption="Título" type="string" <entry key="AVENTURA" value="Aventura"/>
width="100%" <entry key="RPG" value="RPG"/>
required="true" minLength="3" maxLength="100" /> <entry key="ESPORTES" value="Esportes"/>
<ComboBox id="cbbGenero" allowNullSelection="true" <entry key="ESTRATEGIA" value="Estratégia"/>
caption="Gênero" description="ComboBox Exemplo" <entry key="CORRIDA" value="Corrida"/>
updatable="false" required="true" <entry key="Sobrevivencia" value="Sobrevivência"/>
visible="true" type="string" width="100%">
<entry value="Ação" key="Ação" />
<entry value="Aventura" key="Aventura" />
<entry value="Terror" key="Terror" />
<entry value="Sobrevivência" key="Sobrevivência" />
<entry value="Infântil" key="Infântil" />
<entry value="Esportes" key="Esportes" />
<entry value="Corrida" key="Corrida" />
<entry value="RPG" key="RPG" />
<entry value="Outro" key="Outro" />
</ComboBox> </ComboBox>
<TextField id="txfAnoLancamento" caption="Ano de Lançamento" type="number" width="100%" required="true"> <TextField id="txfAnoLancamento" caption="Ano de Lançamento" type="number" width="100%" required="true">
<validation> <validation>