  const threeDotButtonRef = useRef<RefType>(null);

  const executor = processWork.activeAccess.user!;
  const { chatId } = processWork.project!;

  const showOptions =
    processWork.can!.requestRemoveExecutor ||
    processWork.can!.updateExecutor ||
    processWork.activeAccess.taskRemove!.can.complete ||
    processWork.can!.feedback;

  const handleCloseThreeDot = () => {
    if (threeDotButtonRef.current) {
      threeDotButtonRef.current.handleClose();
    }
  };

  return (
    <Card header={<Card.Header>Исполнитель</Card.Header>}>
      {executor && (
        <div className={styles.executor_header_btn}>
          {processWork.can!.chat && (
            <Link to={`/chat/${chatId}`}>
              {/* Временно, потом заменить */}
              <IconButton title="Чат" sx={newDresignButtonSx}>
                <NewChatIcon />
              </IconButton>
            </Link>
          )}
          {showOptions && (
            <ThreeDotButton
              newDesign
              ref={threeDotButtonRef}
              themeBtn={ThemeDotButton.BLUE}
            >
              {processWork.can!.requestRemoveExecutor && (
                <MenuItem onClick={() => {}} disableRipple>
                  Снять исполнителя
                </MenuItem>
              )}
              {processWork.can!.updateExecutor && (
                <MenuItem onClick={() => {}} disableRipple>
                  Сменить исполнителя
                </MenuItem>
              )}
              {processWork.activeAccess.taskRemove!.can.complete && (
                <MenuItem onClick={() => {}} disableRipple>
                  Рассмотреть конфликт
                </MenuItem>
              )}
              {processWork.can!.feedback && (
                <MenuItem onClick={() => {}} disableRipple>
                  Оценить
                </MenuItem>
              )}
            </ThreeDotButton>
          )}
        </div>
      )}
      {executor && (
        <div className={styles.executor_info}>
          <div className={styles.executor_text}>
            <TextLink url={`${config.localDomain}${executor.id}`}>
              <p className={styles.executor_name}>{executor.name}</p>
            </TextLink>
            {/* <span>{executor.firm}</span> */}
          </div>
          <div className={styles.executor_avatar_container}>
            <hr className={styles.yellowLine} />
            <NewAvatar
              photoUrl={executor.photo}
              rating={executor.rating.executor}
              jobDuration={executor.job_duration}
              borderColor={"#F5A623"}
              classname={styles.executor_avatar}
            />
          </div>
        </div>
      )}
    </Card>
  );фы