Commit 575a9941 authored by Curtis Adam's avatar Curtis Adam

Save date updated in cards

parent 2d192f89
...@@ -159,6 +159,10 @@ var CardsSchema = new SimpleSchema({ ...@@ -159,6 +159,10 @@ var CardsSchema = new SimpleSchema({
type: Date, type: Date,
optional: true optional: true
}, },
dateUpdated: {
type: Date,
optional: true
},
learningGoalLevel: { learningGoalLevel: {
type: Number type: Number
}, },
...@@ -381,7 +385,8 @@ Meteor.methods({ ...@@ -381,7 +385,8 @@ Meteor.methods({
learningGoalLevel: learningGoalLevel, learningGoalLevel: learningGoalLevel,
backgroundStyle: backgroundStyle, backgroundStyle: backgroundStyle,
learningIndex: learningIndex, learningIndex: learningIndex,
learningUnit: learningUnit learningUnit: learningUnit,
dateUpdated: new Date()
} }
}, {trimStrings: false}); }, {trimStrings: false});
Cardsets.update(card.cardset_id, { Cardsets.update(card.cardset_id, {
......
...@@ -80,7 +80,9 @@ function importCards(data, cardset, importType) { ...@@ -80,7 +80,9 @@ function importCards(data, cardset, importType) {
centerTextElement: item.centerTextElement, centerTextElement: item.centerTextElement,
learningGoalLevel: item.learningGoalLevel, learningGoalLevel: item.learningGoalLevel,
backgroundStyle: item.backgroundStyle, backgroundStyle: item.backgroundStyle,
learningUnit: item.learningUnit learningUnit: item.learningUnit,
date: item.date,
dateUpdated: item.dateUpdated
}, {trimStrings: false}); }, {trimStrings: false});
} }
} else { } else {
...@@ -99,7 +101,9 @@ function importCards(data, cardset, importType) { ...@@ -99,7 +101,9 @@ function importCards(data, cardset, importType) {
centerTextElement: item.centerTextElement, centerTextElement: item.centerTextElement,
learningGoalLevel: item.learningGoalLevel, learningGoalLevel: item.learningGoalLevel,
backgroundStyle: item.backgroundStyle, backgroundStyle: item.backgroundStyle,
originalAuthor: item.originalAuthor originalAuthor: item.originalAuthor,
date: item.date,
dateUpdated: item.dateUpdated
}, {trimStrings: false}); }, {trimStrings: false});
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment