diff options
Diffstat (limited to 'src/components/settings/account')
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 75 |
1 files changed, 18 insertions, 57 deletions
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index 9c9543749..181b95c8c 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -44,10 +44,6 @@ const messages = defineMessages({ | |||
44 | id: 'settings.account.accountType.premium', | 44 | id: 'settings.account.accountType.premium', |
45 | defaultMessage: '!!!Premium Supporter Account', | 45 | defaultMessage: '!!!Premium Supporter Account', |
46 | }, | 46 | }, |
47 | accountTypeEnterprise: { | ||
48 | id: 'settings.account.accountType.enterprise', | ||
49 | defaultMessage: '!!!Enterprise Account', | ||
50 | }, | ||
51 | accountEditButton: { | 47 | accountEditButton: { |
52 | id: 'settings.account.account.editButton', | 48 | id: 'settings.account.account.editButton', |
53 | defaultMessage: '!!!Edit Account', | 49 | defaultMessage: '!!!Edit Account', |
@@ -169,15 +165,9 @@ export default @observer class AccountDashboard extends Component { | |||
169 | {user.organization && `${user.organization}, `} | 165 | {user.organization && `${user.organization}, `} |
170 | {user.email} | 166 | {user.email} |
171 | <br /> | 167 | <br /> |
172 | {!user.isEnterprise && !user.isPremium && ( | ||
173 | <span className="badge badge">{intl.formatMessage(messages.accountTypeBasic)}</span> | ||
174 | )} | ||
175 | {user.isPremium && ( | 168 | {user.isPremium && ( |
176 | <span className="badge badge--premium">{intl.formatMessage(messages.accountTypePremium)}</span> | 169 | <span className="badge badge--premium">{intl.formatMessage(messages.accountTypePremium)}</span> |
177 | )} | 170 | )} |
178 | {user.isEnterprise && ( | ||
179 | <span className="badge badge--success">{intl.formatMessage(messages.accountTypeEnterprise)}</span> | ||
180 | )} | ||
181 | </div> | 171 | </div> |
182 | <Link to="/settings/user/edit" className="button"> | 172 | <Link to="/settings/user/edit" className="button"> |
183 | {intl.formatMessage(messages.accountEditButton)} | 173 | {intl.formatMessage(messages.accountEditButton)} |
@@ -235,34 +225,7 @@ export default @observer class AccountDashboard extends Component { | |||
235 | ) | 225 | ) |
236 | )} | 226 | )} |
237 | 227 | ||
238 | {user.isEnterprise && ( | 228 | {!user.isPremium && ( |
239 | <div className="account"> | ||
240 | <div className="account__box"> | ||
241 | <h2>{user.company.name}</h2> | ||
242 | <p> | ||
243 | Technical contact: | ||
244 | <Link | ||
245 | className="link" | ||
246 | target="_blank" | ||
247 | to={`mailto:${user.company.contact.technical}?subject=Franz`} | ||
248 | > | ||
249 | {user.company.contact.technical} | ||
250 | </Link> | ||
251 | <br /> | ||
252 | General contact: | ||
253 | <Link | ||
254 | className="link" | ||
255 | target="_blank" | ||
256 | to={`mailto:${user.company.contact.default}?subject=Franz`} | ||
257 | > | ||
258 | {user.company.contact.default} | ||
259 | </Link> | ||
260 | </p> | ||
261 | </div> | ||
262 | </div> | ||
263 | )} | ||
264 | |||
265 | {!user.isEnterprise && !user.isPremium && ( | ||
266 | isLoadingPlans ? ( | 229 | isLoadingPlans ? ( |
267 | <Loader /> | 230 | <Loader /> |
268 | ) : ( | 231 | ) : ( |
@@ -277,27 +240,25 @@ export default @observer class AccountDashboard extends Component { | |||
277 | ) | 240 | ) |
278 | )} | 241 | )} |
279 | 242 | ||
280 | {!user.isEnterprise && ( | 243 | <div className="account franz-form"> |
281 | <div className="account franz-form"> | 244 | <div className="account__box"> |
282 | <div className="account__box"> | 245 | <h2>{intl.formatMessage(messages.headlineDangerZone)}</h2> |
283 | <h2>{intl.formatMessage(messages.headlineDangerZone)}</h2> | 246 | {!isDeleteAccountSuccessful && ( |
284 | {!isDeleteAccountSuccessful && ( | 247 | <div className="account__subscription"> |
285 | <div className="account__subscription"> | 248 | <p>{intl.formatMessage(messages.deleteInfo)}</p> |
286 | <p>{intl.formatMessage(messages.deleteInfo)}</p> | 249 | <Button |
287 | <Button | 250 | label={intl.formatMessage(messages.deleteAccount)} |
288 | label={intl.formatMessage(messages.deleteAccount)} | 251 | buttonType="danger" |
289 | buttonType="danger" | 252 | onClick={() => deleteAccount()} |
290 | onClick={() => deleteAccount()} | 253 | loaded={!isLoadingDeleteAccount} |
291 | loaded={!isLoadingDeleteAccount} | 254 | /> |
292 | /> | ||
293 | </div> | ||
294 | )} | ||
295 | {isDeleteAccountSuccessful && ( | ||
296 | <p>{intl.formatMessage(messages.deleteEmailSent)}</p> | ||
297 | )} | ||
298 | </div> | 255 | </div> |
256 | )} | ||
257 | {isDeleteAccountSuccessful && ( | ||
258 | <p>{intl.formatMessage(messages.deleteEmailSent)}</p> | ||
259 | )} | ||
299 | </div> | 260 | </div> |
300 | )} | 261 | </div> |
301 | </Fragment> | 262 | </Fragment> |
302 | )} | 263 | )} |
303 | </div> | 264 | </div> |