Fixed conversion enabled logic.

This commit is contained in:
Patrick Fic
2020-01-16 10:41:42 -08:00
parent 619cc31c68
commit 5e19d53b29
3 changed files with 13 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
**S3 Folder Structure**
/{shopID}/{jobID}/imagename.ext
**Logic**
1. Get a presigned URL by hitting our own express server with a unique key.
2. Use this presigned URL to upload an individual file.
3. Store the key + the bucket name to the documents record.
4. ???Figure out how to add thumbnails.

View File

@@ -75,7 +75,9 @@ function JobTombstone({ job, ...otherProps }) {
const tombstoneTitle = (
<div>
<Avatar size='large' alt='Vehicle Image' src={CarImage} />
{t("jobs.fields.ro_number") + " " + jobContext.ro_number ?? "0"}
{`${t("jobs.fields.ro_number")} ${
jobContext.ro_number ? jobContext.ro_number : t("general.labels.na")
}`}
</div>
);
@@ -99,7 +101,7 @@ function JobTombstone({ job, ...otherProps }) {
<Button
key='convert'
type='dashed'
disabled={!jobContext.converted}
disabled={jobContext.converted}
onClick={() => {
mutationConvertJob({
variables: { jobId: jobContext.id }

View File

@@ -11,7 +11,7 @@ const S3_BUCKET = process.env.bucket;
// Now lets export this function so we can call it from somewhere else
exports.sign_s3 = (req, res) => {
console.log("Hitting bucket: " + S3_BUCKET);
console.log("Get S3 Signed Put for bucket: " + S3_BUCKET);
const s3 = new aws.S3(); // Create a new instance of S3
// if (!req.body.fileName || req.body.fileType) {
// console.log('req.body.fileName', req.body.fileName)