Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 10795 10736 project and initiative creation rules updates #1562

Merged
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,33 @@ export const buildUiSchema = async (
options: {
section: "step",
},
rule: {
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/name",
schema: { const: "" },
rules: [
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { const: "" },
},
],
},
},
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { minLength: 251 },
},
],
},
{
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/summary",
schema: { minLength: 2049 },
},
},
],
elements: [
{
type: "Section",
Expand Down Expand Up @@ -206,13 +226,33 @@ export const buildUiSchema = async (
options: {
section: "step",
},
rule: {
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/name",
schema: { const: "" },
rules: [
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { const: "" },
},
],
},
},
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { minLength: 251 },
},
],
},
{
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/summary",
schema: { minLength: 2049 },
},
},
],
elements: [
{
scope: "/properties/access",
Expand Down
64 changes: 52 additions & 12 deletions packages/common/src/projects/_internal/ProjectUiSchemaCreate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,33 @@ export const buildUiSchema = async (
options: {
section: "step",
},
rule: {
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/name",
schema: { const: "" },
rules: [
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { const: "" },
},
],
},
},
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { minLength: 251 },
},
],
},
{
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/summary",
schema: { minLength: 2049 },
},
},
],
elements: [
{
type: "Section",
Expand Down Expand Up @@ -143,13 +163,33 @@ export const buildUiSchema = async (
options: {
section: "step",
},
rule: {
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/name",
schema: { const: "" },
rules: [
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { const: "" },
},
],
},
},
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { minLength: 251 },
},
],
},
{
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/summary",
schema: { minLength: 2049 },
},
},
],
elements: [
{
scope: "/properties/access",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,33 @@ describe("buildUiSchema: initiative create", () => {
options: {
section: "step",
},
rule: {
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/name",
schema: { const: "" },
rules: [
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { const: "" },
},
],
},
},
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { minLength: 251 },
},
],
},
{
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/summary",
schema: { minLength: 2049 },
},
},
],
elements: [
{
type: "Section",
Expand All @@ -131,7 +151,9 @@ describe("buildUiSchema: initiative create", () => {
effect: UiSchemaRuleEffects.HIDE,
condition: {
scope: "/properties/view/properties/hero",
schema: { const: "image" },
schema: {
const: "image",
},
},
},
options: {
Expand Down Expand Up @@ -203,13 +225,33 @@ describe("buildUiSchema: initiative create", () => {
options: {
section: "step",
},
rule: {
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/name",
schema: { const: "" },
rules: [
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { const: "" },
},
],
},
},
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { minLength: 251 },
},
],
},
{
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/summary",
schema: { minLength: 2049 },
},
},
],
elements: [
{
scope: "/properties/access",
Expand Down Expand Up @@ -355,13 +397,33 @@ describe("buildUiSchema: initiative create", () => {
options: {
section: "step",
},
rule: {
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/name",
schema: { const: "" },
rules: [
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { const: "" },
},
],
},
},
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { minLength: 251 },
},
],
},
{
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/summary",
schema: { minLength: 2049 },
},
},
],
elements: [
{
type: "Section",
Expand All @@ -370,7 +432,9 @@ describe("buildUiSchema: initiative create", () => {
effect: UiSchemaRuleEffects.HIDE,
condition: {
scope: "/properties/view/properties/hero",
schema: { const: "image" },
schema: {
const: "image",
},
},
},
options: {
Expand Down Expand Up @@ -442,13 +506,33 @@ describe("buildUiSchema: initiative create", () => {
options: {
section: "step",
},
rule: {
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/name",
schema: { const: "" },
rules: [
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { const: "" },
},
],
},
},
{
effect: UiSchemaRuleEffects.DISABLE,
conditions: [
{
scope: "/properties/name",
schema: { minLength: 251 },
},
],
},
{
effect: UiSchemaRuleEffects.DISABLE,
condition: {
scope: "/properties/summary",
schema: { minLength: 2049 },
},
},
],
elements: [
{
scope: "/properties/access",
Expand Down
Loading
Loading