Просмотр исходного кода

Merge pull request #4170 from weseek/fix/7144-checkboxes-for-slackcommand-settings

Fix/7144 checkboxes for slackcommand settings
Yuki Takei 4 лет назад
Родитель
Сommit
ac470d48a7

+ 6 - 4
packages/app/src/components/Admin/SlackIntegration/ManageCommandsProcess.jsx

@@ -75,18 +75,19 @@ const ManageCommandsProcess = ({
           <div className="custom-control custom-checkbox">
           <div className="custom-control custom-checkbox">
             <div className="row mb-5">
             <div className="row mb-5">
               {defaultSupportedCommandsNameForBroadcastUse.map((commandName) => {
               {defaultSupportedCommandsNameForBroadcastUse.map((commandName) => {
+                const checkboxId = `${commandName}-${slackAppIntegrationId}`;
                 return (
                 return (
                   <div className="col-sm-6 my-1" key={commandName}>
                   <div className="col-sm-6 my-1" key={commandName}>
                     <input
                     <input
                       type="checkbox"
                       type="checkbox"
                       className="custom-control-input"
                       className="custom-control-input"
-                      id={commandName}
+                      id={checkboxId}
                       name={commandName}
                       name={commandName}
                       value={commandName}
                       value={commandName}
                       checked={selectedCommandsForBroadcastUse.has(commandName)}
                       checked={selectedCommandsForBroadcastUse.has(commandName)}
                       onChange={toggleCheckboxForBroadcast}
                       onChange={toggleCheckboxForBroadcast}
                     />
                     />
-                    <label className="text-capitalize custom-control-label ml-3" htmlFor={commandName}>
+                    <label className="text-capitalize custom-control-label ml-3" htmlFor={checkboxId}>
                       {commandName}
                       {commandName}
                     </label>
                     </label>
                   </div>
                   </div>
@@ -100,18 +101,19 @@ const ManageCommandsProcess = ({
           <div className="custom-control custom-checkbox">
           <div className="custom-control custom-checkbox">
             <div className="row mb-5">
             <div className="row mb-5">
               {defaultSupportedCommandsNameForSingleUse.map((commandName) => {
               {defaultSupportedCommandsNameForSingleUse.map((commandName) => {
+                const checkboxId = `${commandName}-${slackAppIntegrationId}`;
                 return (
                 return (
                   <div className="col-sm-6 my-1" key={commandName}>
                   <div className="col-sm-6 my-1" key={commandName}>
                     <input
                     <input
                       type="checkbox"
                       type="checkbox"
                       className="custom-control-input"
                       className="custom-control-input"
-                      id={commandName}
+                      id={checkboxId}
                       name={commandName}
                       name={commandName}
                       value={commandName}
                       value={commandName}
                       checked={selectedCommandsForSingleUse.has(commandName)}
                       checked={selectedCommandsForSingleUse.has(commandName)}
                       onChange={toggleCheckboxForSingleUse}
                       onChange={toggleCheckboxForSingleUse}
                     />
                     />
-                    <label className="text-capitalize custom-control-label ml-3" htmlFor={commandName}>
+                    <label className="text-capitalize custom-control-label ml-3" htmlFor={checkboxId}>
                       {commandName}
                       {commandName}
                     </label>
                     </label>
                   </div>
                   </div>