[Utopian Dev] Enable Moderator to Edit Category Inline

in #utopian-io6 years ago (edited)

image.png

This is an installment for the implementation of the feature of adding inline edit functionalities for moderators. This is an implementation in partnership with @sirfreeman.

New Features

  • Enabled Moderator to Edit Contribution Category Inline

moderator-inline-edit-category.gif

  export const moderatorAction = (
      author,
      permlink,
      moderator,
      status,
      questions = [],
      score = 0,
      type,
    ) => dispatch => dispatch(
        moderatorActionRequest(
            author,
            permlink,
            moderator,
            status,
            questions,
            score,
            type,
        )
    );

Added the type (category type) parameter to moderatorActionRequest(). This will pass the new (selected) category type to the backend API.

      <span className={`Contribution__c-${(fullMode === false) ? type : "yes-full"}`}>
        <CategoryIcon from="from-story" type={type}/>
        { isModerator ?
          <InlineCategoryEdit
            value={type}
            types={types}
            post={post}
            moderatorAction={moderatorAction}
            user={user}
          /> :
          categorySlug(type)
        }
      </span>

Added condition to display inline editor when user is a moderator.

Component to display the category inline editor.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved.

You can contact us on Discord.
[utopian-moderator]

Hey @emrebeyler, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!

This is great contribution by you
Thanks for sharing looks like we all need to learn more from you : )

Thank you. It's fulfilling to be part of something meaningful. :)

Congratulations, you were selected for a random upvote! Follow @resteemy and upvote this post to increase your chance of being upvoted again!
Read more about @resteemy here.

잘 보고 갑니다 다음편 기대하고 있겠습니다

@eastmael, Upvote is the only thing I can support you.

thank you friend

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.034
BTC 63475.77
ETH 3117.23
USDT 1.00
SBD 3.94