From 48e0eae9defba486a27010a944d29fb337e3bcd3 Mon Sep 17 00:00:00 2001 From: charles-ramos Date: Sun, 1 Sep 2024 20:42:53 -0300 Subject: [PATCH] maxCollaborators - Limit --- src/dashboard/Settings/Collaborators.react.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dashboard/Settings/Collaborators.react.js b/src/dashboard/Settings/Collaborators.react.js index 14e801fbe..e8d4656b4 100644 --- a/src/dashboard/Settings/Collaborators.react.js +++ b/src/dashboard/Settings/Collaborators.react.js @@ -460,10 +460,10 @@ export default class Collaborators extends React.Component { render() { const maxCollaborators = this.context.settings.fields.fields.maxCollaborators; - const limitReached = this.context.settings.fields.fields.limitReached ?? 0 - const collaborators = this.context.settings.fields.fields.collaborators - // const limitReached = (this.context.settings.fields.fields.limitReached >= this.context.settings.fields.fields.collaborators) ? this.context.settings.fields.fields.limitReached : 0 - // const collaborators = this.context.settings.fields.fields.collaborators; + // const limitReached = this.context.settings.fields.fields.limitReached ?? 0 + // const collaborators = this.context.settings.fields.fields.collaborators + const limitReached = (this.context.settings.fields.fields.limitReached >= this.context.settings.fields.fields.collaborators.length) ? this.context.settings.fields.fields.limitReached : 0 + const collaborators = this.context.settings.fields.fields.collaborators; // (limitReached >= collaborators) : coll console.log('render here') @@ -476,7 +476,7 @@ export default class Collaborators extends React.Component { this.props.legend && ( `${this.props.legend} ${maxCollaborators !== true && maxCollaborators !== null && maxCollaborators > 0 - ? `${collaborators} / ${maxCollaborators}` + ? `${limitReached} / ${maxCollaborators}` : '' }` )