The component manages the seller login process.
role="seller" | Specifies that this login component is for sellers. |
---|---|
v-if="!showVerification" | A condition to display the login form only if the showVerification flag is false. |
<ms-login role="seller" @success="ms.goTo('/admin', true)">
<div v-if="!showVerification">
<div :set="loginField='email'"></div>
<div :set="passwordField='password'"></div>
<input type="email" v-model="username" :placeholder="ms.filters.translate('Enter Email Id')" @keyup.enter="login()" />
<div v-if="errors.username">
{{ms.filters.translate(errors.username)}}
</div>
<div v-temp:show_password="false">
<input :type="ms.temp.show_password?'text':'password'" autocomplete="off" @keyup.enter="login()" :placeholder="ms.filters.translate('Password')" v-model="password" />
</div>
<span v-if="errors.password">{{ms.filters.translate(errors.password)}}</span>
<a @click="login()">
{{ms.filters.translate('Sign in')}}
</a>
</div>
<div v-if="showVerification">
<p style="margin-bottom: 30px;">{{'Verification'}}</p>
<div v-if="seller.verified !='1' && (!ms.settings.seller_verification_method || ms.settings.seller_verification_method == 'email' || ms.settings.seller_verification_method == 'both')">
<h5>{{'Email Verification'}}</h5>
<div>
<a @click="sendVerificationMailtoSeller()">
{{ms.filters.translate('Resend Verification Mail')}}
</a>
</div>
</div>
<div v-if="seller.phone_verified !='1' && (ms.settings.seller_verification_method == 'phone' || ms.settings.seller_verification_method == 'both')">
<p>{{'Mobile Verification'}}</p>
<label for="otp">{{'OTP'}}</label>
<input type="text" id="otp" v-model='seller.otp' placeholder="OTP">
<a @click="sendOtptoSeller()">{{ms.filters.translate('Resend OTP')}}</a>
<a @click="verifySellerOtp()">
{{ms.filters.translate('Submit OTP')}}
</a>
</div>
<a @click="goToSellerlogin()">
{{'Go back to login'}}
</a>
</div>
</ms-login>