diff options
author | 2019-01-07 23:53:32 +0100 | |
---|---|---|
committer | 2019-01-07 23:53:32 +0100 | |
commit | 8fce9fb5ce8a91a0905730efcdbd61ad3fcad6bf (patch) | |
tree | 899a872633f8c87a7ebb067b40b1ff1369851527 /src/components/settings/account | |
parent | Merge (diff) | |
download | ferdium-app-8fce9fb5ce8a91a0905730efcdbd61ad3fcad6bf.tar.gz ferdium-app-8fce9fb5ce8a91a0905730efcdbd61ad3fcad6bf.tar.zst ferdium-app-8fce9fb5ce8a91a0905730efcdbd61ad3fcad6bf.zip |
wip
Diffstat (limited to 'src/components/settings/account')
-rw-r--r-- | src/components/settings/account/AccountDashboard.js | 71 |
1 files changed, 18 insertions, 53 deletions
diff --git a/src/components/settings/account/AccountDashboard.js b/src/components/settings/account/AccountDashboard.js index 9c9543749..f2d3ca8c0 100644 --- a/src/components/settings/account/AccountDashboard.js +++ b/src/components/settings/account/AccountDashboard.js | |||
@@ -169,15 +169,9 @@ export default @observer class AccountDashboard extends Component { | |||
169 | {user.organization && `${user.organization}, `} | 169 | {user.organization && `${user.organization}, `} |
170 | {user.email} | 170 | {user.email} |
171 | <br /> | 171 | <br /> |
172 | {!user.isEnterprise && !user.isPremium && ( | ||
173 | <span className="badge badge">{intl.formatMessage(messages.accountTypeBasic)}</span> | ||
174 | )} | ||
175 | {user.isPremium && ( | 172 | {user.isPremium && ( |
176 | <span className="badge badge--premium">{intl.formatMessage(messages.accountTypePremium)}</span> | 173 | <span className="badge badge--premium">{intl.formatMessage(messages.accountTypePremium)}</span> |
177 | )} | 174 | )} |
178 | {user.isEnterprise && ( | ||
179 | <span className="badge badge--success">{intl.formatMessage(messages.accountTypeEnterprise)}</span> | ||
180 | )} | ||
181 | </div> | 175 | </div> |
182 | <Link to="/settings/user/edit" className="button"> | 176 | <Link to="/settings/user/edit" className="button"> |
183 | {intl.formatMessage(messages.accountEditButton)} | 177 | {intl.formatMessage(messages.accountEditButton)} |
@@ -235,34 +229,7 @@ export default @observer class AccountDashboard extends Component { | |||
235 | ) | 229 | ) |
236 | )} | 230 | )} |
237 | 231 | ||
238 | {user.isEnterprise && ( | 232 | {!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 ? ( | 233 | isLoadingPlans ? ( |
267 | <Loader /> | 234 | <Loader /> |
268 | ) : ( | 235 | ) : ( |
@@ -277,27 +244,25 @@ export default @observer class AccountDashboard extends Component { | |||
277 | ) | 244 | ) |
278 | )} | 245 | )} |
279 | 246 | ||
280 | {!user.isEnterprise && ( | 247 | <div className="account franz-form"> |
281 | <div className="account franz-form"> | 248 | <div className="account__box"> |
282 | <div className="account__box"> | 249 | <h2>{intl.formatMessage(messages.headlineDangerZone)}</h2> |
283 | <h2>{intl.formatMessage(messages.headlineDangerZone)}</h2> | 250 | {!isDeleteAccountSuccessful && ( |
284 | {!isDeleteAccountSuccessful && ( | 251 | <div className="account__subscription"> |
285 | <div className="account__subscription"> | 252 | <p>{intl.formatMessage(messages.deleteInfo)}</p> |
286 | <p>{intl.formatMessage(messages.deleteInfo)}</p> | 253 | <Button |
287 | <Button | 254 | label={intl.formatMessage(messages.deleteAccount)} |
288 | label={intl.formatMessage(messages.deleteAccount)} | 255 | buttonType="danger" |
289 | buttonType="danger" | 256 | onClick={() => deleteAccount()} |
290 | onClick={() => deleteAccount()} | 257 | loaded={!isLoadingDeleteAccount} |
291 | loaded={!isLoadingDeleteAccount} | 258 | /> |
292 | /> | ||
293 | </div> | ||
294 | )} | ||
295 | {isDeleteAccountSuccessful && ( | ||
296 | <p>{intl.formatMessage(messages.deleteEmailSent)}</p> | ||
297 | )} | ||
298 | </div> | 259 | </div> |
260 | )} | ||
261 | {isDeleteAccountSuccessful && ( | ||
262 | <p>{intl.formatMessage(messages.deleteEmailSent)}</p> | ||
263 | )} | ||
299 | </div> | 264 | </div> |
300 | )} | 265 | </div> |
301 | </Fragment> | 266 | </Fragment> |
302 | )} | 267 | )} |
303 | </div> | 268 | </div> |