commit 956aa642af73001c2bf4ccf2ae1aee2f47b397d1
parent af40987c1fa6c232346d040af26acd9fe61c405d
Author: Felicitus <felicitus@felicitus.org>
Date: Wed, 4 Jan 2012 22:23:26 +0100
Forgot to commit important file for the new project report :(
Diffstat:
1 file changed, 22 insertions(+), 0 deletions(-)
diff --git a/src/frontend/js/Models/ProjectReportList.js b/src/frontend/js/Models/ProjectReportList.js
@@ -0,0 +1,21 @@
+/**
+ * Represents a project report list
+ */
+Ext.define("PartKeepr.ProjectReportList", {
+ extend: "Ext.data.Model",
+ fields: [
+ { id: 'id', name: 'id', type: 'int' },
+ { name: 'name', type: 'string'},
+ { name: 'description', type: 'string'},
+ { name: 'user_id', type: 'int'},
+ { name: 'amount', type: 'int', defaultValue: 1 }
+ ],
+ hasMany: [
+ { model: 'PartKeepr.ProjectPart', name: 'parts'},
+ { model: 'PartKeepr.ProjectAttachment', name: 'attachments' }
+ ],
+ proxy: PartKeepr.getRESTProxy("Project"),
+ getRecordName: function () {
+ return this.get("name");
+ }
+});+
\ No newline at end of file