Merge pull request #846 from openreplay/v1.9.0-ui-fixes

fix(ui) - v1.9.0
This commit is contained in:
Shekar Siri 2022-11-29 11:00:23 +01:00 committed by GitHub
commit 3af96c60d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 10 deletions

View file

@ -18,7 +18,6 @@ const SelectedValue = ({ icon, text }) => {
class IssueForm extends React.PureComponent {
componentDidMount() {
const { projects, issueTypes } = this.props;
this.props.init({
projectId: projects[0] ? projects[0].id : '',
issueType: issueTypes[0] ? issueTypes[0].id : '',
@ -27,8 +26,8 @@ class IssueForm extends React.PureComponent {
componentWillReceiveProps(newProps) {
const { instance } = this.props;
if (instance.projectId && newProps.instance.projectId != instance.projectId) {
this.props.fetchMeta(instance.projectId).then(() => {
if (newProps.instance.projectId && newProps.instance.projectId != instance.projectId) {
this.props.fetchMeta(newProps.instance.projectId).then(() => {
this.props.edit({ issueType: '', assignee: '', projectId: newProps.instance.projectId });
});
}
@ -87,7 +86,7 @@ class IssueForm extends React.PureComponent {
<Select
name="projectId"
options={projectOptions}
// value={instance.projectId}
defaultValue={instance.projectId}
fluid
onChange={this.writeOption}
placeholder="Project"
@ -100,7 +99,7 @@ class IssueForm extends React.PureComponent {
name="issueType"
labeled
options={issueTypeOptions}
value={instance.issueType}
defaultValue={instance.issueType}
fluid
onChange={this.writeOption}
placeholder="Select issue type"

View file

@ -6,6 +6,7 @@ import stl from './signup.module.css'
import { signup } from 'Duck/user';
import { connect } from 'react-redux'
import Select from 'Shared/Select'
import { SITE_ID_STORAGE_KEY } from 'App/constants/storageKeys';
const LOGIN_ROUTE = login()
const recaptchaRef = React.createRef()
@ -40,10 +41,10 @@ export default class SignupForm extends React.Component {
}
return null;
}
handleSubmit = (token) => {
const { tenantId, fullname, password, email, projectName, organizationName, auth } = this.state;
localStorage.removeItem(SITE_ID_STORAGE_KEY)
this.props.signup({ tenantId, fullname, password, email, projectName, organizationName, auth, 'g-recaptcha-response': token })
this.setState({ reload: true })
}

View file

@ -3,4 +3,5 @@ export const TIMEZONE = "__$session-timezone$__"
export const DURATION_FILTER = "__$session-durationFilter$__"
export const SESSION_FILTER = "__$session-filter$__"
export const GLOBAL_DESTINATION_PATH = "__$global-destinationPath$__"
export const GLOBAL_HAS_NO_RECORDINGS = "__$global-hasNoRecordings$__"
export const GLOBAL_HAS_NO_RECORDINGS = "__$global-hasNoRecordings$__"
export const SITE_ID_STORAGE_KEY = "__$user-siteId$__"

View file

@ -15,14 +15,12 @@ import {
createEdit,
createRemove,
createUpdate,
createSave,
saveType,
} from './funcTools/crud';
import { createRequestReducer } from './funcTools/request';
import { Map, List, fromJS } from "immutable";
import { GLOBAL_HAS_NO_RECORDINGS } from 'App/constants/storageKeys';
import { GLOBAL_HAS_NO_RECORDINGS, SITE_ID_STORAGE_KEY } from 'App/constants/storageKeys';
const SITE_ID_STORAGE_KEY = "__$user-siteId$__";
const storedSiteId = localStorage.getItem(SITE_ID_STORAGE_KEY);
const name = 'project';