• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / gui / 1057188406

01 Nov 2023 04:24AM UTC coverage: 82.824% (-17.1%) from 99.964%
1057188406

Pull #4134

gitlab-ci

web-flow
chore: Bump uuid from 9.0.0 to 9.0.1

Bumps [uuid](https://github.com/uuidjs/uuid) from 9.0.0 to 9.0.1.
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v9.0.0...v9.0.1)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #4134: chore: Bump uuid from 9.0.0 to 9.0.1

4349 of 6284 branches covered (0.0%)

8313 of 10037 relevant lines covered (82.82%)

200.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

72.73
/src/js/components/settings/quoterequestform.js
1
// Copyright 2021 Northern.tech AS
2
//
3
//    Licensed under the Apache License, Version 2.0 (the "License");
4
//    you may not use this file except in compliance with the License.
5
//    You may obtain a copy of the License at
6
//
7
//        http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//    Unless required by applicable law or agreed to in writing, software
10
//    distributed under the License is distributed on an "AS IS" BASIS,
11
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//    See the License for the specific language governing permissions and
13
//    limitations under the License.
14
import React, { useState } from 'react';
15

16
import { Button, FormControl, FormHelperText, TextField } from '@mui/material';
17

18
import { ADDONS, PLANS } from '../../constants/appConstants';
19

20
const quoteRequest = {
6✔
21
  default: {
22
    title: 'Request a change to your plan',
23
    note: `If you have any questions regarding plan pricing or device limits, leave us a message and we'll respond as soon as we can.`
24
  },
25
  trial: {
26
    title: '2. Request a quote from our team',
27
    note: `If you have any notes about your requirements or device fleet size, leave a message and we'll respond as soon as we can`
28
  },
29
  enterprise: {
30
    title: 'Request a quote from our team',
31
    note: `If you have any notes about your requirements or device fleet size, leave a message and we'll respond as soon as we can`
32
  }
33
};
34

35
export const QuoteRequestForm = ({ addOns, currentPlan, isTrial, onSendMessage, updatedPlan }) => {
6✔
36
  const [message, setMessage] = useState('');
3✔
37

38
  const isEnterpriseUpgrade = updatedPlan === 'enterprise';
3✔
39
  const isUpgrade = Object.keys(PLANS).indexOf(updatedPlan) > Object.keys(PLANS).indexOf(currentPlan);
3✔
40
  let { note, title } = isEnterpriseUpgrade ? quoteRequest.enterprise : quoteRequest.default;
3✔
41
  title = isTrial ? `2. ${title}` : title;
3!
42
  return (
3✔
43
    <div className="flexbox column margin-bottom-large">
44
      <h3 className="margin-top-large">{title}</h3>
45
      {isEnterpriseUpgrade ? 'You are requesting a quote for the following subscription:' : 'You are requesting the following changes:'}
3✔
46
      <div>
47
        <p>
48
          Plan: {isUpgrade ? 'Upgrade to ' : ''}
3✔
49
          <b>{PLANS[updatedPlan].name}</b>
50
          {!isTrial && !!addOns.length && (
6!
51
            <span>
52
              <br />
53
              Add-ons: {addOns.map(addon => ADDONS[addon.name].title).join(', ')}
×
54
            </span>
55
          )}
56
        </p>
57
      </div>
58
      <FormControl style={{ marginBottom: 30, marginTop: 0 }}>
59
        <FormHelperText>Your message</FormHelperText>
60
        <TextField fullWidth multiline placeholder={note} value={message} onChange={e => setMessage(e.target.value)} />
×
61
      </FormControl>
62
      <p>
63
        {isTrial || isEnterpriseUpgrade
9✔
64
          ? `After we receive your request, we'll be in touch to discuss your needs and provide a quote.`
65
          : `We'll send you a confirmation of any changes to your subscription.`}
66
      </p>
67
      <Button
68
        className="margin-top margin-bottom"
69
        color="secondary"
70
        disabled={!(message || (!isTrial && addOns.length))}
9✔
71
        onClick={() => onSendMessage(message)}
×
72
        style={{ alignSelf: 'flex-start' }}
73
        variant="contained"
74
      >
75
        Submit request
76
      </Button>
77
    </div>
78
  );
79
};
80

81
export default QuoteRequestForm;
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc